Open Bug 2061614 Opened 3 months ago

Consider not exposing labelledBy relation when it isn't actually used to name the Accessible

Categories

(Core :: Disability Access APIs, enhancement)

enhancement

Tracking

()

People

(Reporter: Jamie, Unassigned)

References

(Blocks 1 open bug)

Details

STR:

  1. Open this test case:
    data:text/html,<input aria-labelledby="labelledBy" aria-label="label"><div id="labelledBy"></div>
  2. Right click the input and choose Inspect accessibility properties.
  3. Examine the name property. Observe that it is "label".
  4. Expand the relations property and examine its items.
    • Expected: There shouldn't be a labelledBy property.
    • Actual: There is.

The markup specifies that the input is labelled by the div and aria-labelledby takes precedence over aria-label. However, we don't use aria-labelledby as the name because name computation of the div results in empty text. Arguably, we shouldn't expose the labelledBy relation in this case, since it isn't actually labelling the Accessible in reality.

Discovered in bug 2053897. It seems NVDA hacked around this in NVDA #19409. IMO, this is authoring error in the first place. Chromium does the same thing. Even so, we may wish to consider coping with it better.

You need to log in before you can comment on or make changes to this bug.