Re: ACTION-1474 Rewrite text alternative computation.

Hi, Joseph. Answering inline.

On Fri, Nov 7, 2014 at 3:44 PM, Joseph Scheuhammer <clown@alum.mit.edu>
wrote:

> Hi Alex,
>
> Thanks for your comments.  Replies inline:
>
>
>> * "Root node. The DOM node or element <http://rawgit.com/w3c/aria/
>> master/accname-aam/accname-aam.html#dfn-element>", every element is DOM
>> node
>>
>
> Yes, but not every DOM node is an element.  DOM node is the base class for
> elements as well as text nodes, among others.  See:
> http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1950641247
>

I must be missing something. If element is a node then why to mention it at
all. It sounds for me like "I eat steaks or food".


>
>  * "Current node. The DOM node currently traversed to compute its text
>> equivalent.", I'd argue about "its" because current node text equivalent
>> may be not a part of root node text equivalent. For example, text
>> equivalent for plain HTML:p is empty string but text equivalent for a
>> button containing that HTML:p is content of HTML:p. So it looks that it
>> should be "to compute root node text equivalent".
>>
>
> Good point.  Just to be clear (and pedantic), you are suggesting the
> definition of "current node" be changed to:
>
> " The DOM node currently traversed to compute the root node text
> equivalent. Initially, this is the |root node|, but at later stages is
> either some descendant of the |root node|, or another referenced node."
>

Yeah, I don't know how much pedantic you want to be :) you may want to add
" or some descendant of another referenced node", perhaps you could say
"but at later stages this can be a desdendant of the |root node|, a
referenced node (note references allows the recursion) or its descendant".


>
> But, that's not enough to handle your examples.  Taking a plain
> <p>text</p> as the root, and looking at the steps, it appears that 2F
> and/or 2G apply.  Either way, one ends up with "text" as the accessible
> name, but you say it's the empty string. Is there a principle here such as,
> "if the root node is a widget, then all descendants are processed, but if
> the root node is a non-interactive text container, it has no accessible
> name"? Compare, for example:
> http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#
> text-level-elements-not-listed-elsewhere
>

on implementation level we have a map if the role allows name from subtree,
so the rule is rather role dependent. You can take a look at 2e item of
Firefox alg (
http://asurkov.blogspot.ca/2012/11/accessilbe-firefox-text-equivalent.html).
I didn't read the proposed alg so far.


>
>  * 2A "referenced by |aria-labelledby| or |aria-describedby" that denies
>> the native markup to have a reference to hidden nodes, also this doesn't go
>> with Firefox impl|
>>
>
> I'm not sure I understand "that denies the native markup to have a
> reference to hidden nodes".  The full condition here is (hidden &&
> !referenced).  If that condition holds, then the node is skipped.  That
> entails that it is *not* skipped if aria-labelledby or aria-describedby
> *reference* hidden nodes.  In that case the condition fails, and the hidden
> nodes are used.
>

I meant if 2A item mentions ARIA attributes only then the alg leaves name
empty for the following case

<label hidden for="input">I'm a label</label>
<input id="input">

I guess it's disputable whether input's name should be empty or not but the
point is that the rule applies to any possible markup. I would try to word
it more flexible, something like "referenced by aria-.. attributes or by
native markup attributes if markup allows that"


>
> I found a test case in the  test harness where aria-describedby references
> a hidden node, where the expected result is that the accessible description
> is "foo".  I ran it with FF 33.0.3, and got the same result, consistent
> with 2A.  The test case is:
> https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/
> tests/test-files/aria-describedby/773.html
>
>  |*2B doesn't even mention aria-describedby|
>>
>
> Yeah, I just noticed that the other day.  The current working draft
> doesn't mention aria-describedby either, at step 2A in that version.  See:
> [1] http://www.w3.org/TR/core-aam-1.1/#mapping_additional_nd_te (step 2A
> in this version).
>
I went back a few versions, and discovered that this has been missing for a
> while.  I'll have to think about how to work it in.
>

You know I would define a term for them like |ARIA reference attributes| or
similar and say that their usage is text equivalent dependent, i.e if you
compute the accessible name then aria-labelledby is applied only.


>
> Thanks again.
>
>
> --
> ;;;;joseph.
>
> 'Array(16).join("wat" - 1) + " Batman!"'
>            - G. Bernhardt -
>
>

Received on Wednesday, 26 November 2014 16:08:09 UTC