react-joyride
react-joyride copied to clipboard
Aria - alertdialog implementation
alertdialog design pattern is not fully implemented. The design pattern is nearly the same of dialog design patten, only assistive technologies interpretation is not the same.
Like a dialog, alertdialog must :
- have a focustrap 👍
- set focus to a focusable element inside a modal 👍 . Focus is always set to the next button. A nice feature should be, to give the choice where the focus is set on dialog opening
- modal have a title 👎 . The component needs to allow to pass
aria-labeloraria-labbelledbyattribute.aria-labelledbytake an id that should be passed to thetitleelement<h2> - once closed, focus is set back to the button that did open the dialog or to an other element in a more natural workflow. 👍
Also, if the modal is mounted at the very beginning or end of DOM, the title inside the dialog should likely be an <h1> rather than an <h2> because and there is very little chance there will be an <h1> element as parent (this will lead to a W3C error)