Skip to content

Conversation

@fwdekker
Copy link
Contributor

@fwdekker fwdekker commented Nov 21, 2022

According to Firefox' accessibility checker there are some issues with text contrast in Pico. After checking the code, I found that several of these issues relate to the choice of --muted-color. The issues occur in: (1) code blocks, (2) in the subtitle of an article header, and (3) in blockquote footer. In each of these cases, the text colour is --muted-color, so the logical solution to me seemed to adjust the --muted-color.

I changed --muted-color in both themes to be one step closer to the --color. This worked fine for the article header and the blockquote footer, but still wasn't sufficient for the code blocks because the background colour of --muted-background-color is just too similar. So, in the latter case, I decided to replace --muted-color with --color; this is similar to GitHub where code blocks have the same text colour as regular text.

Interestingly, almost all other contrast issues relate to buttons, as described in #123. Maybe I can find some time to look at those later ^^

@lucaslarroche
Copy link
Member

Hi @fwdekker,
Thank you for this work and your detailed explanations.

I know Pico's accessibility issues, but unfortunately, I won't merge this PR.

Two reasons:

  1. If we change the colors, it would be a (small) breaking change for current v1 users,
  2. Most importantly, I'm currently working on Pico v2 ✨ (which allows breaking changes): I've defined a new color palette, and I've just updated all Pico colors in the v2 (with accessibility issues in mind).

All the colors will pass AA, and most of the colors will pass AAA.
Trade-off: the muted color will only be AA (to keep enough difference from the standard color).

v2 preview (work-in-progress):

Dark
Preview-•-Pico-css (1)

Light
Preview-•-Pico-css

@fwdekker
Copy link
Contributor Author

Wow, amazing work! I read elsewhere that you had planned improved accessibility for v2, so I considered my PR more of a temporary fix, but your point about my PR being a breaking chance is also important.

I'm really looking forward to Pico v2, keep up the great work! And I hope you enjoy the holidays ^^

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.

2 participants