Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BITV]: Make sure that contrasts on interactive elements between normal state and focused state have to be 3:1 #40711

Closed
JuliaKirschenheuter opened this issue Sep 29, 2023 · 8 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of accessibility enhancement

Comments

@JuliaKirschenheuter
Copy link
Contributor

This is accessibility issue.

For now the contrast of components between normal state and focused state is in most cases 2:1. It have to be min. 3:1.

Examples: grey(--color-border-maxcontrast) <-> blue (--color-primary-element)

Peek 2023-09-29 1
Peek 2023-09-29 16-13

@jancborchardt @nimishavijay what could we do? Would it be a solution to increase color of --color-primary-element?

@JuliaKirschenheuter JuliaKirschenheuter added enhancement 1. to develop Accepted and waiting to be taken care of accessibility labels Sep 29, 2023
@susnux
Copy link
Contributor

susnux commented Oct 25, 2023

Maybe related, but we also need to change some other colors for accessibility (text contrast):

#40773

So maybe this already fixes the problem?

@nimishavijay
Copy link
Member

nimishavijay commented Oct 25, 2023

Hm, this is a really good question. --color-primary-element was already made darker so that it meets the contrast requirement against a white background. It would be extremely dark if we change it again to have enough contrast against the border color

So maybe this already fixes the problem?

@susnux It actually does help, but the contrast requirement is not met by a pretty big margin so it unfortunately doesn't fix the issue fully :/

Ideas that are coming to mind:

  • Use a thicker border
Recording.2023-10-25.144840.mp4
  • Show a border with a different color (similar to a button, example in the gov.uk website)
Recording.2023-10-25.142226.mp4

Would any of these work @JuliaKirschenheuter ? Important to note that nothing else should shift positions when this border appears (usually there is a slight change in the position of the text when there is a border added, which is not good)

@jancborchardt
Copy link
Member

Using a thicker border seems nice and that is also what some others seem to do. I’d say that’s the preferred solution which looks better than the extra border – which we already use for focus feedback but is quite present.

@susnux
Copy link
Contributor

susnux commented Oct 25, 2023

I agree with Jan the thicker border looks quite good and should not be a problem as the label within the border already requires some margin on top -> no resizing of the element when the border thickened.

@susnux susnux self-assigned this Oct 25, 2023
@marcoambrosini
Copy link
Member

I would keep the same double outline and activate it only on keyboard navigation. So same thickness, same design strategy, and enough contrast.

Screenshot 2023-10-26 at 14 25 27 Screenshot 2023-10-26 at 14 24 00

@JuliaKirschenheuter
Copy link
Contributor Author

JuliaKirschenheuter commented Oct 26, 2023

Hi @marcoambrosini, @nimishavijay,

Thanks for your suggestions!
I'm not sure that thicker border would solve a problem. Michael told about contrast difference and because of it is would tend to Marco's suggestion. That should be fine.

Thank you all!

@susnux
Copy link
Contributor

susnux commented Oct 31, 2023

For reference this is about:
https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance.html

@JuliaKirschenheuter
Copy link
Contributor Author

closing issue, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of accessibility enhancement
Projects
None yet
Development

No branches or pull requests

5 participants