My impression is that this is a matter of halachic value, but there are differing community standards and guidelines on this kind of thing. (Well someone in the last decade or so has probably tried to make a one-size-fits-all law about this, but I'm not aware of it in classical sources.)
I'm told that the German Jewish community of Washington Heights draws its line for mixed swimming for boys of age nine. (Not unreasonable if you have to draw the line somewhere, in my humble opinion; and we do find classical sources discussing the age of nine for boys in other contexts -- e.g. Rambam Laws of Prohibited Relations 1:13.) It wouldn't surprise me if others were lenient with age 10,11, maybe even 12.