-
Notifications
You must be signed in to change notification settings - Fork 125
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
Clarification of *when* a role="alert"
should be announced by AT / fire an alert event
#2153
Comments
/cc @scottaohara |
related #2144 |
This was discussed in today's meeting, but it turned out to be a big topic and we didn't have quite enough time: https://www.w3.org/2024/04/18-aria-minutes.html#t07 Will have to continue the discussion next week (or in a deep dive?). |
Further discussion here: #2154 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe your concern
Currently, in the description for
role="alert"
it statesThe "when the WAI-ARIA alert is created" part is handwavy and vague.
Currently (even though this is not really specified well either - more on this in a separate issue I'll be filing) with live regions, the most reliable way to trigger a live region correctly is to make sure that the live region element/container is "seen" by the browser first, giving AT a chance to then register for the events that are fired when the region's content changes. only then, you'd want to populate the live region element (by dynamically injecting content, or by flipping the visibility of a node inside it, or similar). So, based on the first sentence ("Alerts are assertive live regions"), you'd assume that
role="alert"
elements have the same behaviour.However, it appears that in most browser/screen reader combinations,
role="alert"
is treated slightly magically/special: it seems to trigger an actual SR announcement even if the node is created already fully populated with content. Usually, it even fires an alert notification when the fully populatedrole="alert"
element is present in the markup of the page on first page load.The ARIA spec shies away from defining the expected behavior here. Cross-checking Core-AAM https://www.w3.org/TR/core-aam-1.2/#role-map-alert there's a note https://www.w3.org/TR/core-aam-1.2/#ftn.note2 that actually sidesteps the question completely at this point
I would strongly urge for "some guidance" to be added both in the ARIA spec, and a matching note in the Core-AAM spec.
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)? Yes
The text was updated successfully, but these errors were encountered: