West Virginia State Board of Education v. Barnette, 319 U.S. 624 (1943), is a landmark decision by the United States Supreme Court holding that the First Amendment protects students from being compelled to salute the American flag or say the Pledge of Allegiance in public schools.
They can’t require participation.