eslint-plugin-jsx-a11y icon indicating copy to clipboard operation
eslint-plugin-jsx-a11y copied to clipboard

alertdialog role contradicts no-autofocus; missing check for aria-label | aria-labelledby

Open icecream17 opened this issue 2 years ago • 0 comments

For alertdialog, it says

When the alert dialog is displayed, authors SHOULD set focus to an active element within the alert dialog, such as a form control or confirmation button. https://raw.githack.com/w3c/aria/stable/#alertdialog

Note: The text says to set focus to an "active" (i.e. focused) element, which seems to be a typo.

So in that interpretation, "autoFocus" is recommended. This contradicts no-autofocus.

Edit: See point 3 under accessibility features in https://w3c.github.io/aria-practices/examples/dialog-modal/alertdialog.html


Also, (aria-label or aria-labelled-by) seems to be required:

https://www.w3.org/TR/wai-aria-practices-1.1/#naming_role_guidance https://w3c.github.io/aria-practices/#wai-aria-roles-states-and-properties-1

icecream17 avatar Oct 20 '21 00:10 icecream17