Re: What do you think about the use of aria-label on elements with no role?

Dominic Mazzoni <dmazzoni@google.com> wrote on 04/06/2015 02:07:02 PM:
> OK, so to make sure I understand, your proposal is:
> * Change the ARIA spec to say that aria-label (and similar 
> attributes) do *not* apply to all elements in the base markup, only 
> those without a generic computed role
> * Change all browsers to not expose names computed by attributes 
> like aria-label on such elements

+111!

Matt King
IBM Senior Technical Staff Member
I/T Chief Accessibility Strategist
IBM BT/CIO - Global Workforce and Web Process Enablement 
Phone: (503) 578-2329, Tie line: 731-7398
mattking@us.ibm.com



From:   Dominic Mazzoni <dmazzoni@google.com>
To:     James Craig <jcraig@apple.com>, 
Cc:     "W3C WAI Protocols & Formats" <public-pfwg@w3.org>
Date:   04/06/2015 02:07 PM
Subject:        Re: What do you think about the use of aria-label on 
elements with no role?



OK, so to make sure I understand, your proposal is:

* Change the ARIA spec to say that aria-label (and similar attributes) do 
*not* apply to all elements in the base markup, only those without a 
generic computed role
* Change all browsers to not expose names computed by attributes like 
aria-label on such elements

On Mon, Apr 6, 2015 at 1:31 PM, James Craig <jcraig@apple.com> wrote:
I have an action to include a ~“generic” role which would be the default 
for div. Once we have that, we can adjust it to match the name computation 
accordingly so that generic gets name from contents only. 



On Apr 6, 2015, at 1:21 PM, Dominic Mazzoni <dmazzoni@google.com> wrote:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28413


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".

Received on Monday, 6 April 2015 22:23:38 UTC