You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialogs are most often used to prompt the user to enter or respond to information. A dialog that is designed to interrupt workflow is usually modal. See related alertdialog.
Carbon already supports the danger={true} prop which, in my opinion, should go hand in hand with an alert prop that changes the role of the modal from dialog to alertdialog.
When an alertdialog role is set, assistive technology can announce the contents of the dialog upon being displayed, much like the contents of a role="alert" element are announced. This is desirable for dialogs that should interrupt workflow (see the ARIA description above).
It is also important that the WAI-ARIA guidelines state that a role="alertdialog" element should be supplied with an aria-label or aria-labelledby attribute as well as an aria-describedby attribute. The former is already taken care of by the Modal component, but an aria-describedby attribute should be added for alertdialogs that should point to the body text of the modal (i.e. the element that contains the props.children).
The text was updated successfully, but these errors were encountered:
Detailed description
WAI-ARIA 1.1 describes an alertdialog role. To quote:
Carbon already supports the
danger={true}
prop which, in my opinion, should go hand in hand with analert
prop that changes therole
of the modal fromdialog
toalertdialog
.When an
alertdialog
role is set, assistive technology can announce the contents of the dialog upon being displayed, much like the contents of arole="alert"
element are announced. This is desirable for dialogs that should interrupt workflow (see the ARIA description above).It is also important that the WAI-ARIA guidelines state that a role="alertdialog" element should be supplied with an
aria-label
oraria-labelledby
attribute as well as anaria-describedby
attribute. The former is already taken care of by the Modal component, but anaria-describedby
attribute should be added for alertdialogs that should point to the body text of the modal (i.e. the element that contains the props.children).The text was updated successfully, but these errors were encountered: