MILFORD, Pa. — As a 12-year-old seventh grader, Glenn and Kathy Kiederer’s older daughter wanted to play sports at Delaware Valley Middle School here. She also wanted to join the scrapbooking club.

One day she took home a permission slip. It said that to participate in the club or any school sport, she would have to consent to drug testing.

“They were asking a 12-year-old to pee in a cup,” Kathy Kiederer said. “I have a problem with that. They’re violating her right to privacy over scrapbooking? Sports?”

Olympic athletes must submit urine samples to prove they are not doping. The same is true for Tour de France cyclists, N.F.L. players, college athletes and even some high school athletes. Now, children in grades as low as middle school are being told that providing a urine sample is required to play sports or participate in extracurricular activities like drama and choir.