Re: Another AccName sanity check: presentational role and name computation

Bryan and Joanie,

role=presentation does not remove content from the accessibility tree it only changes its role, so the question seems more that if you apply aria-label to any node does that change the accessible name for that element in for the calculation of the accessible name. 

To me I think we are making the accessible name calculation to complicated for aria-labelledby if we start including the need to account for aria-label or title attribute values.

I think it should simply look at text content, form/widget values and name from ALT and TYPE attributes for images and buttons.

We need to make the algorithm simpler to help people understand it and not make mistakes.

Jon


On 3/19/18, 2:49 PM, "Bryan Garaventa" <bryan.garaventa@levelaccess.com> wrote:

    Hi,
    I'm already in San Diego for the conference, so my internet is somewhat spotty.
    
    I remember asking Joseph about this over a year ago, and he said that if role=presentation is applied to a node, then that node doesn't exist in the accessibility tree, and as such it cannot have an accessible name no matter if it includes a title or aria-label in the recursive processing.
    
    I'll be happy to explore further about the issue you submitted earlier too, but will probably have to wait till next week to dig into it.
    
    
    
    Bryan Garaventa
    Accessibility Fellow
    Level Access, Inc.
    Bryan.Garaventa@LevelAccess.com
    415.624.2709 (o)
    www.LevelAccess.com
    
    -----Original Message-----
    From: Joanmarie Diggs <jdiggs@igalia.com> 
    Sent: Monday, March 19, 2018 11:56 AM
    To: Bryan Garaventa <bryan.garaventa@levelaccess.com>
    Cc: ARIA Working Group <public-aria@w3.org>
    Subject: Another AccName sanity check: presentational role and name computation
    
    Hey again Bryan and others interested in AccName.
    
    I'm now working on the test cases where the expected result includes "Garaventa the weird." Both Firefox and WebKit have results which include "Eli" instead of "Garaventa." Looking at the AccName algorithm, I think Firefox and WebKit are correct.
    
    Searching the algorithm, I see only one mention of the presentational role, namely in step 2D, which states:
    
    <quote>
    Otherwise, if the current node's native markup provides an attribute (e.g. title) or element (e.g. HTML label) that defines a text alternative, return that alternative in the form of a flat string as defined by the host language, unless the element is marked as presentational (role="presentation" or role="none").
    
    Comment:
    For example, in HTML, the img element's alt attribute defines a text alternative string, and the label element provides text for the referenced form element. In SVG2, the desc and title elements provide a description of their parent element.
    </quote>
    
    Looking at your test case, the markup relevant to which name is chosen is this bit:
    
        <span role="presentation" aria-label="Eli">
          <span aria-label="Garaventa">Zambino</span>
        </span>
    
    While the presentational role is applied to the outer span, my understanding of an attribute provided by the node's native markup is something specific to HTML. The aria-label attribute can be used on HTML of course; but the aria-label attribute is not *provided by* HTML. So my read of step 2D is that technically "Eli" should be chosen.
    
    Furthermore, in the case where the thing being calculated is a name, I don't think we'd get to step 2D because step 2C states:
    
    <quote>
    Otherwise, if computing a name, and if the current node has an aria-label attribute whose value is not the empty string, nor, when trimmed of white space, is not the empty string:
    
    * If traversal of the current node is due to recursion and the current
      node is an embedded control as defined in step 2E, ignore aria-label
      and skip to rule 2E.
    
    * Otherwise, return the value of aria-label.
    </quote>
    
    Step 2C doesn't say anything about the presentational role. And the current node is not an embedded control as defined in step 2E. So why don't we want to use the aria-label value of "Eli"?
    
    If I'm missing something please explain. Thanks in advance for your help with this!!
    
    --joanie
    

Received on Monday, 19 March 2018 20:01:55 UTC