Re: text equivalent computation algorithm

Hi, Joseph.

> Interesting.  Maybe <label> imply an aria-labelledby since the <input>
> element is labelled by the <label> element.

If it does then it doesn't do that too implicitly. If it doesn't then
ARIA says how to compute accessible name when no ARIA at all what is
strange. See: "Skip hidden elements unless the author specifies to use
them via an aria-labelledby or aria-describedby being used in the
current computation." So we never hit the part where name is computed
from native markup.

> <div id="label">label <span style="display:none" id="innerSpan">this text
> shouldn't be part of the label</span></div>
> <input id="input" aria-labelledby='label'/>

no name from innerSpan (since it's not referred by aria-labelledby),
that goes with spec and Firefox implementation.

> Actually, when I checked your example (<label style="display:none"
> for="input">label</label><input id="input"/>), the input had no accName,
> implying that the hidden <label> was skipped.  Perhaps I'm doing something
> wrong?

You just spot a regression from Firefox 3.6.

Thank you.
Alex.


On Thu, Mar 22, 2012 at 3:51 AM, Joseph Scheuhammer <clown.idi@gmail.com> wrote:
> Hi Alex,
>
>
> Alexander Surkov wrote wrote:
>
>> Firefox text equiv computation algorithm is different from ARIA spec
>> algorithm (here:
>>
>> http://www.w3.org/TR/2009/WD-wai-aria-implementation-20090224/#mapping_special_te)
>> and actually it sounds like it differed forever (see first draft
>>
>> http://www.w3.org/TR/2009/WD-wai-aria-implementation-20090224/#mapping_special_te).
>
>
> FWIW, I found a similar clause in the first draft in the W3C repository:
>
>> If the current node is hidden and not currently pointed to directly by an
>> aria-labelledby or aria-describedby used in this text equivalent
>> traversal,
>> then, skip the node.
>
> The log says that the document was copied from Mozilla's developer site:
> https://developer.mozilla.org/en/ARIA_User_Agent_Implementors_Guide
>
> Yes, it appears that FF's implementation differed from the spec from the
> start.  It suggests that it differed from Mozilla's own documentation.
>
>
>> 1) "Skip hidden elements unless the author specifies to use them via
>> an aria-labelledby or aria-describedby being used in the current
>> computation."
>>
>> Firefox doesn't skip any hidden elements IDRefed by attributes used in
>> text equivalent calculation. For example, the spec requires to left
>> name blank for input element in following case:
>> <label style="display:none" for="input">label</label><input id="input"/>
>
>
> Interesting.  Maybe <label> imply an aria-labelledby since the <input>
> element is labelled by the <label> element.  Perhaps it is a special case?
>  For example, what does FF do when there are no label-like elements nor
> attributes with respect to a hidden element (the innerSpan in the
> following):
>
> <div id="label">label <span style="display:none" id="innerSpan">this text
> shouldn't be part of the label</span></div>
> <input id="input" aria-labelledby='label'/>
>
> Is the accName "label"? Or is it "label this text shouldn't be part of the
> label"?  Actually I cheated and looked*, and it's just "label".  In this
> case, the hidden element was skipped.  In fact, when the 'display:none'
> style is removed from innerSpan, the accName becomes "label  this text
> shouldn't be part of the label".
>
> Actually, when I checked your example (<label style="display:none"
> for="input">label</label><input id="input"/>), the input had no accName,
> implying that the hidden <label> was skipped.  Perhaps I'm doing something
> wrong?  The test file I used is:
>  http://clown.idrc.ocad.ca/Fluid/aria/hiddenTextLabel.html
>
> * using FF 11 and viewed with Accerciser.
>
> --
> ;;;;joseph.
>
>
> 'A: After all, it isn't rocket science.'
> 'K: Right. It's merely computer science.'
>             - J. D. Klaun -
>

Received on Thursday, 22 March 2012 05:48:32 UTC