dequelabs / dequelabs/axe-core

False positive: 'color-contrast' rule fails disabled control's label added using "aria-describedby" attribute

Open
#4,406 13 comments 0 reactions 0 assignees View on GitHub
color contrast fix rules
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 13h
Merged PRs (30d)
29

Description

### Product

axe-core

### Product Version

4.9.0

### Latest Version

- [X] I have tested the issue with the latest version of the product

### Issue Description

Same as [2090](https://github.com/dequelabs/axe-core/issues/2090), but here the label is added using `aria-describedby` attribute

Per WCAG 1.4.3 the text that is part of an inactive user interface component do not have contrast requirement.

> Incidental: Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement.

#### Expectation

'color-contrast' would not fail for labels related to disabled controls

#### Actual

'color-contrast' rule fails for a label( added using `aria-describedby` attribute) of a disabled control

#### How to Reproduce

![Screenshot 2024-04-11 at 16 28 26](https://github.com/dequelabs/axe-core/assets/76945696/b9b20403-34ad-4f57-8366-f702fca732f7)

Contributor guide

Open the contributing guide

Research direction

Start from the axe-core color-contrast rule and reproduce the reported case with a disabled control whose label is connected through aria-describedby. Confirm the current failure, then verify that labels related to disabled controls no longer produce a color-contrast failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.