Description
Description of bug or feature request
Nothing is announced when focus is placed on an input with an aria-describedby reference and the referenced node contains role=status, role=alert or aria-live. Occurs on Safari and Firefox, but works on Chrome.
Example:
<input maxlength="255" name="Name" required="" type="text" aria-describedby="help-message-1503">
<div id="help-message-1503" role="status">Complete this field.</div>
In the following codepen, the first example has the role=status and the second one does not. Only the second one announces the referenced content: https://codepen.io/A11yGreg/pen/dyxazYY
I submitted a bug to WebKit and Tyler Wilcock advised me to submit a bug here. He believes the issue is caused by the following:
When WebKit needs to resolve the text behind aria-describedby, it combines the "accessible names" for each element-by-id pointed to in the
aria-describedby
. WebKit computes the accessible name for an element by either using thenameFrom: author
algorithm, or thenameFrom: contents
algorithm (https://w3c.github.io/aria/#namecalculation), or computes no name for the role (see "prohibited" in the spec link). Because role="status" isnameFrom: author
, that means we do not consider descendants when computing the name, only author-provided markup on the role="status" element like aria-label.I don't know why this works in Chrome. It's possible they've noticed how this behavior can be unintuitive, and workaround the spec to provide a better user experience. But probably the best solution is for an issue to be filed on the WAI-ARIA spec so all browsers can become aligned.