Skip to content

Make default style meet WCAG AA - #1940

Merged
Anteru merged 1 commit into
pygments:masterfrom
not-my-profile:default-style-wcag-aa
Nov 13, 2021
Merged

Anteru merged 1 commit into
pygments:masterfrom
not-my-profile:default-style-wcag-aa

Conversation

@not-my-profile

@not-my-profile not-my-profile commented Nov 2, 2021 •

Copy link
Copy Markdown
Contributor

Accessibility by default is important.

The colors with a too low contrast were adjusted just
so much that they match the required contrast of 4.5.

Part of #1718.


tests/html_linenos_expected_output somehow needs to be updated for the tests to pass ... but I don't know how.

Screenshots

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image

Accessibility by default is important.

The colors with a too low contrast were adjusted just
so much that they match the required contrast of 4.5.

Part of pygments#1718.
@not-my-profile not-my-profile mentioned this pull request Nov 2, 2021
5 of 7 tasks
@Anteru

Anteru commented Nov 2, 2021

Copy link
Copy Markdown
Collaborator

Thanks for preparing this! I'll fix the lineos update. Do you happen to have a before/after screenshot for the default style?

@not-my-profile

Copy link
Copy Markdown
Contributor Author

Yeah, I added screenshots for all changed colors.

@Anteru

Anteru commented Nov 2, 2021

Copy link
Copy Markdown
Collaborator

Thanks a lot. That is much more subtle than I expected.

@birkenfeld

Copy link
Copy Markdown
Member

Indeed, thanks a lot!

@not-my-profile

Copy link
Copy Markdown
Contributor Author

You're welcome :) Once this is merged, I'll proceed with the steps I outlined in #1718.

@Anteru Anteru self-assigned this Nov 13, 2021
@Anteru
Anteru merged commit 6f6409e into pygments:master Nov 13, 2021
@Anteru

Anteru commented Nov 13, 2021

Copy link
Copy Markdown
Collaborator

Merged, thanks a lot. Pray continue.

tk0miya added a commit to tk0miya/sphinx that referenced this pull request Dec 11, 2021
To increse accessiblity of our docs, this changes the pygments_theme of
sphinx-docs.org to "default".  It was updated to meet WCAG AA in
pygments/pygments#1940.
tk0miya added a commit to tk0miya/sphinx that referenced this pull request Dec 11, 2021
…lity

To increse accessiblity of our docs, this changes the pygments_theme of
sphinx-docs.org to "default".  It was updated to meet WCAG AA in
pygments/pygments#1940.
Ast-x64 added a commit to Ast-x64/diff_cover that referenced this pull request Jan 26, 2022
The pygments module made a change to default snippet styles in 2.11.0,
    which breaks the test_style_defs unit here using predefined styles
    from old pygments.
See pygments/pygments#1940 for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants