Settings

Theme

Modal dialogs without React (or JavaScript)

laktek.com

2 points by laktek 2 months ago · 1 comment

Reader

PaulHoule 2 months ago

We had an accessibility review last winter where we were getting complaints that our React-based modals were not completely hiding content from accessibility checkers and screen readers. <dialog> turned out to be a great solution when we rebuilt our <Modal>(s) around them. There is a little mismatch between the edge-triggered events of the <dialog> and the way React wants to be level-triggered but it was not hard to reconcile.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection