Re: accessible name calculation for hidden labels

Hi Steve,

> It is unclear to me, from reading the accname spec [1] whether the 
> following markup  examples should result in an accessible name for a 
> control

The only step that deals with hidden is step 2A [1]:

"If the current node is hidden and is not referenced by aria-labelledby 
or aria-describedby, nor referenced by a native host language text 
alternative element or attribute, return the empty string. "

Given your examples, the "current node" is the <label> element.  It's 
not referenced by aria-labelledby, nor aria-describedy, nor any other 
element.  Assuming it is hidden [2], then the empty string is returned 
-- the <label> is not used in the calculation.

However, it could be argued that there is an implicit labelledby 
reference from the <input> back to the <label>.  The algorithm does not 
currently deal with implicit relationships. Maybe it should, but I am 
uncertain.

My uncertainty is I can't tell what should the accessible name is meant 
to be in your examples.  An author has explicitly added a <label> 
element to the markup.  That suggests the label text is to be used as 
the name of the <input>.  But, then they hide it, suggesting the author 
wants the <input> to not have any name.  What is the author's goal here?

[1] http://w3c.github.io/aria/accname-aam/accname-aam.html#step2A
[2] http://w3c.github.io/aria/accname-aam/accname-aam.html#dfn-hidden

-- 
;;;;joseph.

'Array(16).join("wat" - 1) + " Batman!"'
            - G. Bernhardt -

Received on Tuesday, 22 September 2015 15:51:54 UTC