medialize / ally.js

JavaScript library to help modern web applications with accessibility concerns
http://allyjs.io/
MIT License
1.53k stars 82 forks source link

Dialog content not focused when opened in Mac / VoiceOver #176

Open gurmukhp opened 4 years ago

gurmukhp commented 4 years ago

Navigate the following link with VoiceOver on mac: https://allyjs.io/tutorials/dialog.example.html

Linearly navigate to 'Show Dialog' button. Press ctrl+option+space to click the button

Visually, the text box is focused, however no announcement is made, VoiceOver announces the button is disabled. Linearly navigating brings focus into the dialog.

Would it be worth focusing the dialog element when the button is clicked? Sometimes I've had issues with Voiceover setting the focus and have had to set a timeout or use requestAnimationFrame to get around this.