-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARIA: The accessible name calculation for links including aria-label doesn't match the accessibility tree in the Virtual Buffer using IE and FF #3852
Comments
Attachment test.html added by bgaraventa on 2014-02-05 23:28 |
Comment 1 by jteh on 2014-02-06 01:51
Of course, if there is somewhere in the spec which documents exactly how and when this should be done without causing these and other problems, we'd be happy to implement it. |
Comment 2 by jteh (in reply to comment 1) on 2014-02-06 01:52
Note that this isn't possible in Firefox 18 and earlier, but I guess we can require users to update. |
Comment 3 by spanchang02 on 2014-02-10 16:32
On pressing the 'D' key to jump to the landmark, NVDA should say 'Navigation landmark secondary'. or better 'secondary navigation landmark'. The response to #1195 that 'Main' or 'Secondary' should be marked up as a heading above the navigation links is wishful thinking. A Web page is designed based mainly on the visual UI specss. That's why |
Comment 4 by jteh (in reply to comment 3) on 2014-02-10 23:50
On the other hand, no one who has made any of these requests has given a satisfactory explanation of how to implement this without breaking other use cases and without making arbitrary decisions that aren't justified by spec.
And where in the spec does this concept of "identifier" come from?
If you'd thoroughly considered my point, you will note I said "If we always use the name reported by the browser". The point is that we can't just blindly use the name given to us by the browser as the reporter suggested, otherwise we will lose semantic and formatting information in all cases, not just aria-label.
"The element's name". They say nothing about whether the name gets rendered by a screen reader in browse mode. That is the crux of the issue.
I'm aware of that. My point was that the request to have aria-label override content conflicts with that of labelling landmarks and regions.
But you said above that for links, we should override the content with the aria-label. So which is it? Do we override the content with the label or not? How do we know which? Where is this choice clearly defined in the spec? As far as I can see, the spec only talks about the name. It doesn't talk about which should be treated as content as far as the user is concerned.
So on one hand, you want us to comply with the spec. On the other, you want us to violate it to compensate for incorrect markup. Which is it to be?
If you want to talk about spec compliance, go ahead and quote the sections of the spec that clearly state when we should render aria-label instead of content and when we should render content instead of aria-label. That has always been the debate here. |
Comment 5 by bgaraventa on 2014-02-11 23:46 For a scenario where developers wish to provide a more informative label for screen reader users as part of a link, aria-label or aria-labelledby is provided according to the W3C accessible naming calculation. If a developer follows it, they would expect that the screen reader would provide the more informative label to the user. Currently nothing added via aria-label is conveyed by NVDA however, which is why I filed the bug. One way to accommodate for differences, is to provide an NVDA setting regarding feedback, the default following the W3C naming calculation and reading aria-label or aria-labelledby instead of inner text when present, another that would read only the screen text and not the aria-label/aria-labelledby association, and a third that would read both together. In this way, you could provide a method to achieve any desired level of access and still adhere to the naming convention for active elements with native or explicit role associations. The desired feedback level would then be up to the user. |
Comment 6 by jteh (in reply to comment 5) on 2014-02-12 00:21
The question is how you define "active elements" (and whether that is covered by the spec).
That's fine for a link, but the question is: other than links, where do we apply this rule? If we apply it to editable text fields, for example, the user won't see the content inside the field. If we apply it to tables, the user won't see the content of the table. That's the point I'm trying to make.
I realise this isn't ideal and we need something better, but it's worth noting that NVDA does render aria-label/aria-labelledby if the content is effectively empty, as there is no ambiguity in that case. So, the following rather ugly hack will work:
Aside from the fact that most users won't understand such a setting (thereby making itpractically useless in the wild), the point is that I still don't know when we're supposed to have aria-label override the content and when we're not. You say "active elements", but as far as I know, the spec doesn't cover such a concept. We can make our own decisions about what roles we should do this for, but such decisions wouldn't be in compliance with the spec. According to anything quoted from the spec in this ticket, aria-label should override the content for all elements, which would break a whole load of use cases, labelled landmarks and regions among them. |
Comment 7 by jteh on 2014-02-14 08:58 |
Reported by bgaraventa on 2014-02-05 23:27
When a standard link includes aria-label to set a specific name to be conveyed to screen reader users as the link name, only the screen text is conveyed in the Virtual Buffer, which does not match the accessible name calculation provided by the W3C at
http://www.w3.org/TR/wai-aria/roles#namecalculation
and
http://www.w3.org/WAI/PF/aria-implementation/#mapping_additional_nd
E.G. Referenced from: http://www.w3.org/TR/wai-aria/roles#namecalculation
Authors MAY specify an element's text alternative in content attributes,
used in this order of preference:
a.. The aria-labelledby attribute takes precedence as the element's text
alternative unless this computation is already occurring as the result of a
recursive aria-labelledby declaration (in other words, aria-labelledby is
not recursive when referenced from another element, so it will not cause
loops). However, the element's aria-labelledby attribute can reference the
element's own IDREF in order to concatentate a string provided by the
element's aria-label attribute or another feature lower in this preference
list. The text alternatives for all the elements referenced will be computed
using this same set of rules. User agents will then trim whitespace and join
the substrings using a single space character. Substrings will be joined in
the order specified by the author (IDREF order in the aria-labelledby
attribute).
b.. If aria-labelledby is empty or undefined, the aria-label attribute,
which defines an explicit text string, is used. However, if this computation
is already occurring as the result of a recursive text alternative
computation and the current element is an embedded control as defined in
rule 2B, ignore the aria-label attribute and skip directly to rule 2B.
As a result, the name of the link that is announced by NVDA, does not match the accName property of the link as it exists within the accessibility tree.
For example, the following code is a standard link that uses aria-label to set a screen reader specific label:
31
When the accessibility tree accName property is viewed, "December 31, 2013" is set as the name for the link.
However, when using the arrow keys or tabbing to read the link name, "31" is announced by NVDA instead, which doesn't match the accessibility tree.
Confirmed on Win XP Pro and Win 7, using IE8 through 10 and the latest release of Firefox.
Steps to reproduce:
Blocked by Render aria-label in browse mode when it is used to override content #1354
The text was updated successfully, but these errors were encountered: