Skip to content

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

Closed

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

Activity

  1. melissawm commented on Mar 21, 2024

    @melissawm
    Member
  2. trallard commented on Mar 22, 2024

    @trallard
    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

  3. mattip commented on Mar 24, 2024

    @mattip
    Member

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

    pydata-sphinx-theme==0.13.3

  4. added a commit that references this issue on Mar 24, 2024
    defe9de
  5. hugovk commented on Mar 24, 2024

    @hugovk
    ContributorAuthor

    Let's go for the newest version, 0.15.2.

    Please see PR #26125.

  6. trallard commented on Mar 24, 2024

    @trallard
    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.

  7. added a commit that references this issue on Apr 18, 2024
    9cef25c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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