I think I understand HOW Javascript has to work in order to be O.K. for section 508. But I have been unable to find an answer to a related question: does my site need to work W
It used to be the case that finding JavaScript on a website meant there was little to no chance that the site in question would be accessible. Thanks to things like ARIA roles and especially focus control, inaccessible javascript is a thing of the past.
In order to make your js comply, you simply have to pay attention to where the focus is, and whether or not your actual content can be accessed by assistive technology. There are easily dozens of resources on this topic, but none so much to the point as Google's Intro to Web Accessibility class. Fear not, it doesn't require much more than an email address, and you can get the majority of what you need in a hurry, should that be your need. Good luck! Accessible js takes a little bit of work, but it is worth it!