Repository navigation
Do not override the color of visited links #328
Description
Activity
- changed the title
[-]Do not override the color of visited links in dark theme[/-][+]Do not override the color of visited links[/+]on Sep 13, 2026 Indeed, we set a colour for visited links in both the light theme:
python-docs-theme/python_docs_theme/static/pydoctheme.css
Lines 354 to 356 in d3002a5
div.body a:visited { color: #6363bb; } and the dark theme:
python-docs-theme/python_docs_theme/static/pydoctheme_dark.css
Lines 51 to 53 in d3002a5
div.body a:visited { color: #09e; } The WCAG guidance states:
setting or conveying a link's visited status is not an author responsibility. Where color alone distinguishes between visited and unvisited links, it does not result in a failure of this Success Criterion, even where the contrast between the two link colors is below 3:1. Note that authors must continue to ensure that all text links meet contrast minimums against the page background
So, WCAG does not require visited links to have a distinct colour. This is broadly consistent with Harvard's guidance, which recommends leaving visited-link styling to the browser.
That said, I agree that the current colours in the dark theme are too similar. As such, I propose we change it to a lighter purple so that the distinction is clearer. Also, the defaults of some browsers have poor contrast with out dark mode.
Reacted by Hugo van Kemenade- linked a pull request that will close this issueImprove contrast between unvisited and visited links in the dark mode #329
on Sep 13, 2026
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo
Documentation
The Python documentation pages (docs.python.org) override the default color of visited links to blue / bluish purple, which makes them almost indiscernible from links not yet visited, especially in the dark theme -- see these screenshots from https://docs.python.org/3.14/library/functions.html#compile taken without any browser extensions enabled:
This is quite an oversight: when reading documentation, one wants to see which sections or pages they have already read, in order not to read them twice; and more importantly, in the case of cyclic references (which are quite common not only in the Python documentation), highlighting visited links in different color helps the reader to avoid going in circles, repeatedly visiting the same pages over and over.
For comparison, here are screenshots of the same content, but with the default color of visited links:
Suggested solution: Set the color of visited links to the browser default. Or, at the very least -- if you must change it (which I'm pretty sure you don't) -- change it to something visibly different from the default link color.
Temporary fix: Use Stylus or a similar extension to modify the style of
docs.python.org, and add the following:Browser: Firefox 153.0 (without any extensions)
OS: Windows 10 22H2