hugovk,
@hugovk@mastodon.social avatar

Two recent changes I've made to the Python docs I'm happy about:

📘 Links are underlined, which is important for accessibility.
https://adrianroselli.com/2016/06/on-link-underlines.html

📗 The dated Lucida Grande was the Mac system font a decade ago and used for the docs on Mac (and only Mac). We now use the system font stack, to get a similar result to Linux, Windows, Android and iOS.
https://systemfontstack.com

Before: https://docs.python.org/3.10/tutorial/index.html

After: https://docs.python.org/3.12/tutorial/index.html

#Python #docs #documentation #a11y #accessibility #font

The Python tutorial, shown on macOS with Arial and prose, non-navigational links are underlined.

hugovk,
@hugovk@mastodon.social avatar
jdlbt,
@jdlbt@techhub.social avatar

@hugovk This is great, thank you!

Any chance these changes can be retroactively applied to older Python versions docs? When developing libraries, we often have to look specifically for these notes in the docs of multiple Python versions, e.g 3.9 - 3.12.

hugovk,
@hugovk@mastodon.social avatar

@jdlbt
You're welcome!

They've been applied to 3.12 and 3.13.

Only security fixes are allowed for 3.8-3.11, but if there's a fix that means the docs are rebuilt for 3.10-3.11, they'll pick up the new theme.

But not for 3.8 and 3.9, they're pinned to an old version of the theme for other reasons.

https://devguide.python.org/versions/

ethantyping,
@ethantyping@hachyderm.io avatar

@hugovk ooo this looks great! As a followup you may want to check the colors work for people who are color blind if you haven't already.

hugovk,
@hugovk@mastodon.social avatar

@ethantyping Thanks! Yes, this follows the WCAG guidelines that say:

"Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element."

https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html

As before the change, the information is conveyed via text, and not colour alone.

I also checked the contrast ratio meets at least the WCAG AA guidelines (4.5), with all but one meeting AAA (7.0).

https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum

https://github.com/python/python-docs-theme/pull/185

hugovk,
@hugovk@mastodon.social avatar

@ethantyping We're also hoping to do an accessibility audit, which may start with an evaluation of the colours used throughout the theme.

daoud,
@daoud@toot.wales avatar

@hugovk great stuff. Thanks for bringing the underlining of links to my attention. I think we're going to need to make some changes to Mwmbl...

hugovk,
@hugovk@mastodon.social avatar

@daoud https://adrianroselli.com/2016/06/on-link-underlines.html is a good overview:

"Remember, this is for addressing how links are styled in the body of a page, the narrative content, where they sit among blocks of unlinked text. Not navigation, not footers, not page controls, etc."

We initially underlined navigational links, but it was a bit much, so removed those. Technical docs have lots of text in code format; we moved the underline down a bit for those so as not to obscure underlines.

__sharky__,
@__sharky__@mastodon.social avatar

@hugovk looks good 👍

pbx,
@pbx@fosstodon.org avatar

@hugovk Nice work. I'd say the increased line spacing on the new version (that's what I'm seeing on my Android phone anyway) is also a nice readability improvement.

hugovk,
@hugovk@mastodon.social avatar

@pbx Thanks! Yes, that's good too :)

PS I like the "Rivers I've lived near" in your bio. Mine: Dee (name means "goddess"), Ouse ("water"), Avon ("river"), Mersey ("boundary river"), Vantaa ("place behind a riverbed")

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines