Skip to content

Conversation

@Pytal
Copy link
Member

@Pytal Pytal commented Nov 17, 2022

WCAG AA

“WCAG 2.0 level AA requires a contrast ratio of at least . . . 3:1 for large text.” (Source)

“Large text is defined as 14 point (typically 18.66px) and bold or larger, or 18 point (typically 24px) or larger.” (Source)

Dark mode

Before (18px, normal) After (19px, bold)
image image
Contrast ratio

image

Light mode

Before (18px, normal) After (19px, bold)
image image
Contrast ratio

image

@Pytal Pytal added this to the Nextcloud 26 milestone Nov 17, 2022
@Pytal Pytal self-assigned this Nov 17, 2022
@Pytal
Copy link
Member Author

Pytal commented Nov 17, 2022

/backport to stable25

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Pytal
Copy link
Member Author

Pytal commented Nov 17, 2022

/rebase

@Pytal Pytal force-pushed the fix/a11y-search-heading branch from b1e14fe to 5fe90b5 Compare November 17, 2022 17:52
@jancborchardt
Copy link
Member

Shouldn’t we adjust color-primary-element to be lighter in dark mode? Cause where do we use it anyway, if as text color it doesn’t work?

@Pytal
Copy link
Member Author

Pytal commented Nov 21, 2022

Shouldn’t we adjust color-primary-element to be lighter in dark mode? Cause where do we use it anyway, if as text color it doesn’t work?

It's used by primary buttons
image

With the recent switch from #0082c9 to #00639a if we switch to a lighter color #0088d1 (lighter than #0082c9) to meet contrast requirements for text on dark backgrounds then we would simultaneously no longer meet contrast requirements for the primary button

Any suggestions @jancborchardt?

@Pytal
Copy link
Member Author

Pytal commented Nov 22, 2022

Using --color-text-maxcontrast work for you @nimishavijay?

@nimishavijay
Copy link
Member

If the field is focused it should be --color-primary-element. If it's not focused then it can be --color-text-maxcontrast :)
Regarding what @jancborchardt was mentioning, I think he meant that since there is a darker variant of the primary color for light mode, there could similarly be a lighter variant for dark mode. So that would be 2 variants of --color-primary-element one for light mode, one for dark mode. Would that make sense?

@Pytal
Copy link
Member Author

Pytal commented Nov 23, 2022

If the field is focused it should be --color-primary-element. If it's not focused then it can be --color-text-maxcontrast :) Regarding what @jancborchardt was mentioning, I think he meant that since there is a darker variant of the primary color for light mode, there could similarly be a lighter variant for dark mode. So that would be 2 variants of --color-primary-element one for light mode, one for dark mode. Would that make sense?

With the recent switch from #00639a#006aa3 we could instead keep the primary color and meet heading contrast requirements by increasing the font size to 19px and bolding

image
image

Soung good @nimishavijay?

@nimishavijay
Copy link
Member

Alright that sounds good :)

@Pytal Pytal force-pushed the fix/a11y-search-heading branch from 5fe90b5 to 29b1748 Compare November 25, 2022 00:19
@Pytal
Copy link
Member Author

Pytal commented Nov 25, 2022

Alright that sounds good :)

Code + screenshots updated :)

@Pytal Pytal requested a review from nimishavijay November 25, 2022 00:36
@Pytal Pytal requested a review from artonge December 6, 2022 02:00
@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Dec 6, 2022
@Pytal Pytal merged commit 9e8545e into master Dec 6, 2022
@Pytal Pytal deleted the fix/a11y-search-heading branch December 6, 2022 22:45
@Pytal
Copy link
Member Author

Pytal commented Dec 6, 2022

/backport to stable25

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

backportbot-nextcloud bot commented Dec 7, 2022

The backport to stable25 failed. Please do this backport manually.

#35639

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

Labels

4. to release Ready to be released and/or waiting for tests to finish accessibility feature: search

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants