react-joyride icon indicating copy to clipboard operation
react-joyride copied to clipboard

Aria - alertdialog implementation

Open jonasdd opened this issue 4 years ago • 0 comments

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-label or aria-labbelledby attribute. aria-labelledby take an id that should be passed to the title element <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)

jonasdd avatar Jun 28 '21 08:06 jonasdd