Skip to content

HTML documentation has accessibility issues for movement-impaired developers #101109

Closed
python/python-docs-theme
#103

Description

@ccazabon

Documentation

This is a small issue, and one that most developers probably won't notice - but when you have some physical issues that make small, precision movements difficult, it's frustrating.

In the HTML version of the documents, as seen on docs.python.org, links are rendered with only the text as the object wrapped in the <a...> link tag. Most of the time, this is fine, but when the wrapped word is very small, the link can become difficult to "hit" when you can't manipulate a mouse pointer as precisely as you'd want to.

The worst example of this is the bare capital-I which I run into a lot on the docs index page (https://docs.python.org/3/genindex.html) as shown here:
pydocs-links

At my normal font/zoom size (which is large enough for me to read without issue), the capital-I to go to that subsection of the index is a small vertical bar, 3 pixels wide. It's very difficult for me to hit correctly; it takes me several tries. There are other examples; bare 1s for footnotes or other text can also be problematic.

Perhaps links could be rendered with a minimum width or some other CSS magic to make them hittable with limited physical precision.

Thanks!

Activity

  1. hugovk commented on Jan 18, 2023

    @hugovk
    Member

    Thanks for the report.

    For the case of the index letters, I've opened a PR to add some extra padding via CSS:

    I've made a demo build. Please could you have a look? Is that wide enough or would it benefit from a bit more space?

  2. hugovk commented on Jan 18, 2023

    @hugovk
    Member

    There are other examples; bare 1s for footnotes or other text can also be problematic.

    Do you mean things like the "[1]" at https://docs.python.org/3/howto/urllib2.html#headers ?

    In that case, the link is covering three characters and in normal font size. I wonder if we have others which are plain "1" in superscript?

    (At least for the https://peps.python.org/ site, we're generally trying to avoid footnotes where we can instead include links inlined in the text.)

  3. hugovk commented on Feb 5, 2023

    @hugovk
    Member

    @ccazabon Did you get a chance to see if this is an improvement? Thanks!

    https://hugovk-cpython.readthedocs.io/en/accessibilty-index-target-area/genindex.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions