This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28413 - Clarify use of aria-label on elements with no role
Summary: Clarify use of aria-label on elements with no role
Status: RESOLVED MOVED
Alias: None
Product: ARIA
Classification: Unclassified
Component: Spec (show other bugs)
Version: 1.0
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: James Craig
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 20:20 UTC by Dominic Mazzoni
Modified: 2018-05-14 16:42 UTC (History)
1 user (show)

See Also:


Attachments

Description Dominic Mazzoni 2015-04-06 20:20:05 UTC
Developers are confused about what should happen if you put an aria-label on an element with no role, like an empty <div> element. While most browsers do interpret the aria-label and expose it, some screen readers ignore it. For example:

<div aria-label="Label">Text</div>

Firefox exposes "Label" as the accName, but "Text" as the IAccessibleText, and Windows screen readers read out "Text". Safari+VoiceOver is different, VoiceOver reads out "Label".

Do you think the current Windows end-user behavior is correct, or not? Should we clarify the spec to make it crystal-clear that adding aria-label on any random element does not necessarily override that element's text, or should we change the current behavior?

Note that elements without an ARIA role can still get a label, it depends on computed role, not the ARIA role. As an example:

<h3 aria-label="ARIA Heading">Text Heading</h3>

Every browser and screen reader combination I tested read out "ARIA Heading" here, not "Text Heading".
Comment 1 James Nurthen 2018-05-14 16:42:04 UTC
https://github.com/w3c/aria/issues/756