Re: Regarding the accessible name calculation for aria-label within links?

I agree, this does seem to confuse the behavior I had originally mentioned. 
I
agree that, in most cases, there would be no reason to diverge from what is
visually displayed.

Here are some use cases though that do reflect what I've seen on public 
sites however, where the use of aria-label would be desirable to override 
visual text.

1

<a href="#"><sup>1</sup></a>

Which could be accurately conveyed as a footnote by doing the following:

<a href="#" aria-label="footnote1"><sup>1</sup></a>

2

<a href="#"><i>5</i></a>

Which could be accurately conveyed as an online user list by doing the 
following:

<a href="#" aria-label="5 friends online" ><i>5</i></a>

3

<a href="#">&gt;&gt;</a>

Which could be accurately conveyed as a date picker Next Month button by 
doing the following:

<a href="#" role="button" aria-label="Next Month" >&gt;&gt;</a>

4

<button>&gt;&gt;</button>

Which could be accurately conveyed as a pagination Next Page button by doing 
the following:

<button aria-label="Next Page" >&gt;&gt;</button>

I've seen variations such as these across Facebook, LinkedIn, Google, Yahoo, 
and so on, viewed by billions daily.

My point is, if developers wish to improve accessibility by adding 
accessible text in this manner, using aria-label as the spec has documented, 
it won't work, because ATs can't agree on how to support it.

----- Original Message ----- 
From: "Joseph Scheuhammer" <clown@alum.mit.edu>
To: "Sailesh Panchang" <sailesh.panchang@deque.com>; "Joseph Scheuhammer"
<clown@alum.mit.edu>
Cc: "James Teh" <jamie@nvaccess.org>; "Bryan Garaventa"
<bryan.garaventa@whatsock.com>; "James Craig" <jcraig@apple.com>;
<mick@nvaccess.org>; "Schnabel, Stefan" <stefan.schnabel@sap.com>; "WAI
XTech" <wai-xtech@w3.org>
Sent: Friday, February 14, 2014 2:09 PM
Subject: Re: Regarding the accessible name calculation for aria-label within
links?


> Hi Sailesh,
>
>> But how should the following be interpreted:
>> <span role="listitem" aria-label="I am a listitem">What is my <a
>> href="#" aria-label="name">nom de plume</a>?</span>
>
> I am unsure what you are asking when you say "how should the following be
> interpreted".  That depends on who is doing the interpreting :-) .
>
> I'll start with a given.  The aria spec mandates that the browser exposes
> the following accessibles and their names through the a11y API for your
> markup.  Accessibles are given in upper case.  The tree is based on FF 27
> as viewed using an a11y inspector (apologies if the tree structure is not
> apparent):
>
> LIST_ITEM {
>     name: "I am a listitem"
>     TEXT {
>         name: "What is my"
>     }
>     LINK {
>         name: "name"
>         TEXT {
>             name: "nom de plume"
>         }
>     }
>     TEXT {
>         name: "?"
>     }
> }
>
>> And my take is:
>> The identity of the SPAN is: "I am a listitem"
>
> If, by "identity", you mean the a11y name, I agree.  Otherwise, what do
> you mean by "identity"?
>
>> So this should be exposed to the browser and ATs should render it as
>> one navigates to the SPAN i.e. list item.
>
> I think you mean "exposed *by* the browser?  If so, yes.
>
>> And the content of the SPAN too should be exposed as you suggested
>> earlier:
>> "What is my name?"
>
> This raises an interesting point.  In my example, the a11y *name* of the
> LIST ITEM was "What is my name?".  I was showing that a name-from-contents
> calculation could switch to name-from-author for a single descendant
> element, and then switch back.  I said nothing specifically about the
> *contents* of the LIST ITEM.
>
> Based on the above a11y tree, the contents of the LIST ITEM is exposed as
> "What is my nom de plume?".  But, that's based on the assumption that the
> contents are built out of the TEXT accessibles. Note that matches the
> content that the browser renders on screen.
>
> So:  I disagree that the content of the LIST ITEM is "What is my name?".
>
>> And browsers and ATs should render this.
>
> Well, as I said, the browser renders "What is my nom de plume?" as the
> content of the list item, not "What is my name?"  I think ATs should
> render the same content, here.  I don't see a reason for ATs to render
> different content.  However, a position in this thread is that ATs reserve
> the right to do what they want.  Perhaps there is a justification for
> rendering the content differently as "What is my name?", but, if there is
> such justification in this case, it escapes me.
>
> Here's a use case:  a screen-reader/magnifier user.  The magnifier
> presents an enhanced version of what the browser has rendered on screen,
> namely "What is my nom de plume?".  If, at the same time the screen reader
> speaks something different, say, "What is my name?", that is going to
> confuse the user.
>
> By the way, if it's not obvious, the browser does not explicitly render
> the a11y names on screen.  The names exist only in the a11y API.
>
> -- 
> ;;;;joseph.
>
>
> 'A: After all, it isn't rocket science.'
> 'K: Right. It's merely computer science.'
>              - J. D. Klaun -
>
>

Received on Friday, 14 February 2014 23:46:26 UTC