Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable items in rustdoc fail WCAG color contrast criterion #93393

Closed
GKFX opened this issue Jan 27, 2022 · 0 comments · Fixed by #107527
Closed

Unstable items in rustdoc fail WCAG color contrast criterion #93393

GKFX opened this issue Jan 27, 2022 · 0 comments · Fixed by #107527
Labels
C-bug Category: This is a bug.

Comments

@GKFX
Copy link
Contributor

GKFX commented Jan 27, 2022

https://doc.rust-lang.org/core/intrinsics/index.html has a long list of unstable functions. They have a text colour of #9a6e31, and due to the unstable class on their parent an opacity of 0.65. This results in text with too little contrast against their background to be read by all users.

Firefox can't use the opacity of parent elements to calculate colour contrast, but if I move the opacity into the text colour I calculate a ratio of 2.46:
Screenshot from 2022-01-27 22-32-28

This is much less than the recommended minimum value of 4.5 (WCAG 1.4.3). The little unsafe triangle is even fainter as it starts pale and is then also made 65% opaque. The contrast should be increased. This might be by removing the opacity rule and indicating instability by a symbol, or some other means.

It might be worth lumping this issue into #59845, but as it's quite specific I thought I'd file it as its own issue initially.

@GKFX GKFX added the C-bug Category: This is a bug. label Jan 27, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 31, 2023
…r=GuillaumeGomez

rustdoc: stop making unstable items transparent

Fixes rust-lang#93393
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 31, 2023
…r=GuillaumeGomez

rustdoc: stop making unstable items transparent

Fixes rust-lang#93393
@bors bors closed this as completed in f75b350 Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant