Open Bug 1682254 Opened 5 years ago Updated 3 years ago

[Accessibility] Label associated with disabled input is announced as clickable

Categories

(Core :: Disability Access APIs, defect)

Firefox 85
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vincent.francolin.dev, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0

Steps to reproduce:

Create an input with a label (in this exemple, it is a checkbox but it is the same for text input and I guess for any type input) and makes it disable.

Exemple:
<input type="checkbox" disabled="disabled" id="cb"> <label for="cb">checkbox label</label>

Actual results:

With NVDA screenreader, the label is announced as clickable while no interaction is possible as the associated input is disabled.

Expected results:

Label should not be announced as clickable as no interaction is possible with it given the input is disabled.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

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

Jamie, I have seen this in the past as well even with simple test cases and no click listeners in sight. Do you know why this is happening?

Flags: needinfo?(jteh)

In general, a label is clickable because clicking it activates the control, so it has an implicit click listener. In this case, the input is disabled, so that doesn't make a huge amount of sense. I guess Gecko still adds the implicit click listener even when it's disabled (presumably because the control might lose its disabled state) and it just does nothing when the control is disabled.

The only way I can think of to work around this is to have the a11y engine avoid exposing the click action on the label if the associated input is disabled. The problem with that, though, is that an author could add their own click listener to the label and we wouldn't be able to distinguish that, so the user would never know about it.

Flags: needinfo?(jteh)
Severity: -- → S3
See Also: → 1816212
You need to log in before you can comment on or make changes to this bug.