Open Bug 1505974 Opened 10 months ago Updated 6 months ago
Text of element with role="alert" not included in description when referenced by aria-describedby
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".
You need to log in before you can comment on or make changes to this bug.