Setting focus of a screen reader on a modal alert in ember

前端 未结 1 1002
鱼传尺愫
鱼传尺愫 2020-12-19 21:38

I am attempting to make my ember.js app more accessible and am doing my testing via Apple\'s built-in VoiceOver utility. I\'m adding ariaRoles as necessary to my views and t

相关标签:
1条回答
  • 2020-12-19 22:20

    I don't have first hand experience with modal stuff. Essentially your issue is you are throwing on an ARIA role, and kind of expect it to work. You need to do more than that. You need to keep the following in mind:

    • Once the link/button is pressed, move focus to the modal window/dialog/popup. Most modal elements are simply a <div>. You can give the<div> an attribute of tabindex="-1".
    • Trap focus inside the modal window.
    • Allow the user to press escape to close
    • When closed, move focus back to link/button

    Resources

    • keyboard accessibility with lightboxes
    • Similar question at UX StackExchange
    • Demo modal dialog - I think this is still under dev (I haven't heard from the author for a while).
    • jQuery Google Group thread (Hans is the top guy or one of, for this stuff)
    0 讨论(0)
提交回复
热议问题