Skip to content

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

@hugovk

Description

@hugovk

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):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions