Page MenuHomePhabricator

Accessibility: make crucial warnings an alert
Open, Needs TriagePublic

Description

Every crucial message element equipped with a class [[ https://codesearch.wmflabs.org/deployed/?q=errorbox&i=nope&files=&repos= | errorbox ]] or warningbox etc. shall get the ARIA attribute role="alert" as well.

Example: MediaWiki:Titleprotected‎ which shall inform that neither editing nor page creation is possible.

Reason: Screenreaders will process such elements and preface their story with such warnings rather than starting from the first beginning and page navigation, where the section with the warning may be skipped. Since blind people cannot see that there is a big red box on page they might not catch an important information. The preview warning on source editing is just some text among many other text.

The same goes for popup boxes alerting on crucial state, as generated by OOui etc. OOui needs to provide a flag. When such popup is inserted a good screenreader shall listen to DOM and tell the user.

Event Timeline

It seems useful to me to add role=alert to errors, warnings seem more to be cautious when we alert screenreader users, as it completely stops the page or task flow.
With OOUI MessageDialogs labelled under “Quick alert” in the demos, it seems necessary to look into current applications before adding such disruptive behaviour. A lot of those in-production could actually backfire when changed upstream.