Closed Bug 1505974 Opened 3 years ago Closed 2 years ago
Text of element with role="alert" not included in description when referenced by aria-describedby
47 bytes, text/x-phabricator-request
|Details | Review|
STR: 1. Open this test case: data:text/html,<input type="text" aria-describedby="alert"><div id="alert" role="alert">Error</div> 2. Right click the input and select Inspect Accessibility Properties. 3. Check the description property. Expected: description: "Error" Actual: description: "" If you remove role="alert", it works as expected. Originally reported as an NVDA issue: https://github.com/nvaccess/nvda/issues/8929
This is because some div with role="alert" gets its text contents added as a description, not as the name. According to the WAI-ARIA 1.1 spec, this is correct behavior, as role="alert" requires name only from author, which means aria-label or aria-labelledby. See https://www.w3.org/TR/wai-aria-1.1/#alert. The description is not looked at when collecting text from aria-describedby references, and neither is the sub tree for role="alert".
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/0f628062e4f0 Include the subtree of role="alert" when referenced by aria-labelledby/describedby. r=MarcoZ
You need to log in before you can comment on or make changes to this bug.