standards-support
standards-support copied to clipboard
Inconsistent Live Region output when dynamically adding ARIA roles/attributes
Summary
Inconsistent Live Region output when dynamically adding ARIA roles/attributes
- Save as HTML file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>live region</title>
</head>
<body>
<div id=1>
content of live region
</div>
<button onClick="document.getElementById('1').setAttribute('role','alert');">add alert</button>
<button onClick="document.getElementById('1').removeAttribute('role');">remove alert</button>
<button onClick="document.getElementById('1').setAttribute('aria-live','assertive');">add aria-live</button>
<button onClick="document.getElementById('1').removeAttribute('aria-live');">remove aria-live</button>
</body>
</html>
- Activate all four buttons one after the other
Expected result
- Since ARIA roles may not be added dynamically, but ARIA attributes can be added, output should only occur when aria-live is added and not when role=alert is added
- Output should be consistent in all browsers
Actual result
- no output when adding aria-live, but when adding role=alert (Chrome, Firefox)
- no output at all in IE 11 when dynamically adding aria-live or role=alert
See also https://github.com/w3c/aria-practices/issues/78 and many other problems with live regions: https://github.com/FreedomScientific/VFO-standards-support/issues?q=live+region
The live region is output as follows:
Chrome
alert: yes aria-live: no
IE 11
alert: no aria-live: no
Firefox
alert: yes aria-live: no
Additional Information
JAWS version and build number
JAWS 2019.1907.42
Operating System and version
Windows 8
Browser and version:
Chrome 76.0.3809.100 Firefox 68.0.2 Internet Explorer 11.0.9600.19431
- Chrome Version 121.0.6167.140 (Official Build) (64-bit) + JAWS 2024
- Firefox 122.0.1 (64-bit) + JAWS 2024
- Chrome Version 121.0.6167.140 (Official Build) (64-bit) + NVDA 2023.3.2
- Firefox 122.0.1 (64-bit) + NVDA 2023.3.2
results
- NVDA - does not announce
aria-livein chrome - NVDA - does not announce
aria-livein Firefox - JAWS - does not announce
aria-livein chrome - JAWS - does not announce
aria-livein Firefox
@JAWS-test wrote:
Since ARIA roles may not be added dynamically, but ARIA attributes can be added, output should only occur when aria-live is added and not when role=alert is added
can you point to the normative words about your statement in the spec?
can you point to the normative words about your statement in the spec?
This was in the ARIA specification 5 years ago, but has been removed