Search code examples
javascriptaccessibilitysection508

How do you alert a sight-impaired user that a modal window is being displayed?


I've been looking all over and there doesn't seem to be any recommendations about this. About the only think I can come up with is providing something on a link that produces the modal such that ("opens new window" or someesuch). I'm unsure how a screenreader would dynamically alert the users, other than when the modal shows to change the focus to an element that says "new modal window" that is not visible to sighted users?


Solution

  • A modal isn't any different than other dynamically-created elements. It's likely in the page on load, right? Setting focus and using the role attribute can get the job done.

    Here's a good article