Open Bug 1944115 Opened 1 year ago Updated 1 year ago

aria-description not taken into account when empty string

Categories

(Core :: Disability Access APIs, defect)

Firefox 135
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ike, Unassigned)

Details

Steps to reproduce:

Using NVDA screenreader on Windows and this code:

<button
  aria-label="Some action"
  aria-description=""
  title="In Chromium this is ignored as aria-description is set. Whereas in Firefox this is announced."
>This is ignored as aria-label is set.</button>

Also see https://github.com/nvaccess/nvda/issues/14580#issuecomment-2616664047

Actual results:

NVDA screenreader announces: "{aria-label} button {title}"

Expected results:

NVDA screenreader should announce:
"{aria-label} button {aria-description}"

As aria-description is the empty string, this would actually result in:
"{aria-label} button"

Also see:
https://www.w3.org/TR/html-aam-1.0/#accdesc-computation

https://www.w3.org/TR/accname-1.2/#mapping_additional_nd_description

User agents MUST use the first applicable entry from the table where the listed conditions are met, as described in the last column. The user agent MUST NOT use any markup other that the first relevant markup found, even if that markup results in an empty description:

With a null character hack this also works in Firefox:

<button
  aria-label="Some action"
  aria-description="&#0;"
  title="This is ignored as aria-description is set to null character. This is also ignored in Firefox."
>This is ignored as aria-label is set.</button>

The Bugbug bot thinks this bug should belong to the 'Core::Disability Access APIs' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Disability Access APIs
Product: Firefox → Core

Interesting, thanks for the links to the specs. I suspect that we're moving on when we see the empty string somewhere in our AccName calculations in nsTextEquivUtils.cpp. This looks like an interesting test case for the cross-browser interop project, as well.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.