Skip to content

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

@nvaccessAuto

Description

@nvaccessAuto

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:

  1. Run NVDA and open the attached file in IE and FF.
  2. Press the Down Arrow, and confirm that the link name does not match "December 31, 2013".
  3. Press Tab and Shift+Tab, and confirm that the link name does not match "December 31, 2013".
    Blocked by Render aria-label in browse mode when it is used to override content #1354

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions