adobe / adobe/spectrum-web-components
[Bug][a11y]: SideNav: State of active SideNavItem lacks 3 to 1 contrast ratio.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 262
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 68
Description
### Code of conduct
- [X] I agree to follow this project's code of conduct.
### Impacted component(s)
SideNav, SideNavItem
### Expected behavior
The selected SideNavItem color MUST have at least a 3 to 1 luminosity contrast ratio with either the inner or outer adjacent background.
### Actual behavior
The selected SideNavItem color does not have at least a 3 to 1 luminosity contrast ratio with either the inner or outer adjacent background.
Color and contrast ratio details:
Selected state color: #EEEEEE
Adjacent background color: #FAFAFA
The contrast ratio is: 1.1:1
This is a failure of WCAG Success Criteria: [1.4.11 Non-text Contrast (Level AA) – WCAG 2.1](https://www.w3.org/TR/WCAG21/#non-text-contrast)
WCAG Understanding document: https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast
### Screenshots
### What browsers are you seeing the problem in?
_No response_
### How can we reproduce this issue?
1. Go to '...'
2. Click on '....'
3. Scroll to '....'
4. Check console
5. See error
### Sample code that illustrates the problem
_No response_
### Logs taken while reproducing problem
_No response_
Contributor guide
Research direction
Start by inspecting the SideNav and SideNavItem implementations and their selected-state styling. Compare the #EEEEEE selected color with the #FAFAFA adjacent background using WCAG 1.4.11 guidance; the work is done when the selected state reaches at least a 3:1 contrast ratio with an adjacent background.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100