Accessible dialogs that actually work
I don't know about you, but modal dialogs have always been my Accessibility Holy Grail: there are descriptions of it out there, official documentation on how it should work, the dialog role, yada-yada – but in practice, all the examples I've ran into can't even work properly in VoiceOver. Until I stumbled upon A11y Dialog , a lightweight script (only 1.4kb) kickstarted at Edenspiekermann – that checks all the boxes : Proper ARIA landmarks Styling freedom Closing by pressing ESC Closing by clicking the background overlay/scrim Simple yet powerful DOM API Well documented Lightweight Links A11y Dialog Demo A11y Dialog Documentation A11y Dialog on Github