I have noticed that both my waterproof shorts and my husband's swim trunks have besom pockets, and they can be quite handy. The inner lining of these pockets is made of mesh material.
His pockets do not have a button, but mine do. I wear these shorts on the beach when we stay at a hotel that actually still gives out room keys instead of cards to its guests, and I put the key in my pocket. The spaces between the center button and the edges of the pocket are narrow enough to keep the key from slipping out into the ocean.