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

Heading anchors do not have sufficient contrast #96

Closed
Tracked by #72
gabalafou opened this issue May 28, 2024 · 0 comments
Closed
Tracked by #72

Heading anchors do not have sufficient contrast #96

gabalafou opened this issue May 28, 2024 · 0 comments
Assignees
Labels

Comments

@gabalafou
Copy link
Contributor

gabalafou commented May 28, 2024

The anchor links (next to the headings and only visible on hover) do not have sufficient contrast with the site background.

@gabalafou gabalafou changed the title The anchor links (next to the headings and only visible on hover) do not have sufficient contrast with the site background Heading anchors do not have sufficient contrast May 28, 2024
@gabalafou gabalafou changed the title Heading anchors do not have sufficient contrast [S] Heading anchors do not have sufficient contrast May 30, 2024
@gabalafou gabalafou moved this from 📬 TODO to Dev in czi-scientific-python 🐍 May 31, 2024
@gabalafou gabalafou added the size: S A few hours, less than one week label May 31, 2024
@trallard trallard moved this from Dev to 📬 TODO in czi-scientific-python 🐍 Jun 4, 2024
@gabalafou gabalafou changed the title [S] Heading anchors do not have sufficient contrast Heading anchors do not have sufficient contrast Aug 8, 2024
@gabalafou gabalafou self-assigned this Aug 8, 2024
drammock pushed a commit to pydata/pydata-sphinx-theme that referenced this issue Aug 8, 2024
Previously, when the heading was hovered but not the actual hash-anchor
itself, the anchor would be 70% opaque. Hovering the anchor itself would
bring it to 100% opacity.

However, at 70% opacity, the contrast between the #-anchor and the
background did not meet accessibility contrast requirements (for normal
text, WCAG AA requires 4.5:1 contrast ratio).

This PR makes it so that it's always 100% opaque, whether you hover the
heading or the actual anchor itself.

This means that the anchor itself does not have a perceivable hover
state, but I'm not sure it needs one. If we decide that it does need a
hover state, we can add one later. At any rate, the previous 30% change
in opacity to mark the hover state (hovering the heading to hovering the
#-anchor) was too subtle to meet accessibility requirements.

Fixes external issue
Quansight-Labs/czi-scientific-python-mgmt#96.
@trallard trallard closed this as completed Aug 8, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to 💪🏾 Done in czi-scientific-python 🐍 Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants