Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Question for the specification of an alert role #2401

Open
ungjinPark opened this issue Dec 15, 2024 · 2 comments
Open

[Question] Question for the specification of an alert role #2401

ungjinPark opened this issue Dec 15, 2024 · 2 comments
Labels

Comments

@ungjinPark
Copy link

ungjinPark commented Dec 15, 2024

Describe your concern

Hello, I am visually impaired and work in accessibility research, testing, and quality assurance for websites and applications in South Korea.

I have a question regarding the specification of role="alert".

Initially, I understood that live regions can only notify changes to their child nodes. This understanding is also reflected in the MDN (Mozilla Developer Network) documentation. According to the documentation, it states:

As with all other live regions, alerts will only be announced when the content of the element with role="alert" is updated. Make sure that the element with the role is present in the page's markup first - this will "prime" the browser and screen reader to keep watching the element for changes. After this, any changes to the content will be announced. Do not try to dynamically add/generate an element with role="alert" that is already populated with the alert message you want announced - this generally does not lead to an announcement, as it is not a content change.

However, I’ve observed that when hidden alerts (via CSS) are made visible or when new alert elements are dynamically added to the DOM, various screen readers such as iOS VoiceOver, Android TalkBack, and NVDA announce them.

What is the correct specification in this case?

Link to the version of the specification or documentation you were looking at at.

Link to documentation: https://www.w3.org/TR/wai-aria-1.3#alert

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?

Sorry, I don't know

@scottaohara
Copy link
Member

scottaohara commented Dec 19, 2024

@ungjinPark might i suggest reading this "recent" write-up from tetralogical on the state of live regions.

the answer to your larger question/more may very well be within.

to your specific question of:

What is the correct specification in this case?

The ARIA specification is always the correct source of truth. MDN is a great resource - but it is not a specification. Sometimes it is a bit like a game of telephone - someone rewriting the spec text in a less spec-y sort of way. Miscommunications can happen.

Regarding this ask:

I’ve observed that when hidden alerts (via CSS) are made visible or when new alert elements are dynamically added to the DOM, various screen readers such as iOS VoiceOver, Android TalkBack, and NVDA announce them.

Patrick's post goes over this a bit, but alerts are a bit special in the live region family - as they're pretty consistently treated as being automatically announced as soon as they're rendered in the a11y tree. whether the be because content was populated into an existing alert, or if the alert and its content were revealed by changing their display from none to block, OR if the alert and its content were injected into the DOM.

@scottaohara scottaohara removed their assignment Dec 19, 2024
@ungjinPark
Copy link
Author

ungjinPark commented Dec 23, 2024

@ungjinPark might i suggest reading this "recent" write-up from tetralogical on the state of live regions.

the answer to your larger question/more may very well be within.

to your specific question of:

What is the correct specification in this case?

The ARIA specification is always the correct source of truth. MDN is a great resource - but it is not a specification. Sometimes it is a bit like a game of telephone - someone rewriting the spec text in a less spec-y sort of way. Miscommunications can happen.

Regarding this ask:

I’ve observed that when hidden alerts (via CSS) are made visible or when new alert elements are dynamically added to the DOM, various screen readers such as iOS VoiceOver, Android TalkBack, and NVDA announce them.

Patrick's post goes over this a bit, but alerts are a bit special in the live region family - as they're pretty consistently treated as being automatically announced as soon as they're rendered in the a11y tree. whether the be because content was populated into an existing alert, or if the alert and its content were revealed by changing their display from none to block, OR if the alert and its content were injected into the DOM.

Thank you for your kind response.

I raised this issue concerning the Korean national screen reader, Sense Reader. Specifically, it does not read the rendered alert element, so I was seeking clarification on the relevant specifications.

Wishing you all the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants