Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Inaccessible contrast for a:visited links in admonitions #26058

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

Closed
hugovk opened this issue Mar 17, 2024 · 5 comments · Fixed by #26125
Closed

DOC: Inaccessible contrast for a:visited links in admonitions #26058

hugovk opened this issue Mar 17, 2024 · 5 comments · Fixed by #26125

Comments

@hugovk
Copy link
Contributor

hugovk commented Mar 17, 2024

Issue with current documentation:

  1. Visit https://numpy.org/neps/nep-0029-deprecation_policy.html
  2. If you've not visited the link "SPEC 0 — Minimum Supported Versions" before, it looks like:
image
  1. Click the link "SPEC 0 — Minimum Supported Versions"
  2. Return to https://numpy.org/neps/nep-0029-deprecation_policy.html
  3. It looks like:
image

The contrast of purple on the dark background is low: it's ratio is 1.51, below the WCAG AA level of 4.5:

image

This comes from basic.css, which I think is from Sphinx:

a:visited {
    color: #551A8B;
}

If I disable the rule, it looks like this, with a good ratio of 5.37:

image

The docs use PyData Sphinx Theme 0.13.3, but I can't reproduce the problem with these links (and inspecting the elements to edit in a link):

@melissawm
Copy link
Member

@trallard
Copy link
Contributor

This is fixed in the most recent versions of the theme (with the updated colour palette). So once the pin on 0.13 is removed this should no longer be a problem.

It's also related to #25927

@mattip
Copy link
Member

mattip commented Mar 24, 2024

The pin is here. Should we pin to a newer version? Which one?

pydata-sphinx-theme==0.13.3

hugovk added a commit to hugovk/numpy that referenced this issue Mar 24, 2024
Fixes inaccessible contrast for a:visited links in admonitions. Fixes numpy#26058.
@hugovk
Copy link
Contributor Author

hugovk commented Mar 24, 2024

Let's go for the newest version, 0.15.2.

Please see PR #26125.

@trallard
Copy link
Contributor

Bringing this issue also to this conversation as it would be good to ensure both the colour and font issues mentioned in #25927 are addressed.

charris pushed a commit to charris/numpy that referenced this issue Apr 18, 2024
Fixes inaccessible contrast for a:visited links in admonitions. Fixes numpy#26058.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants