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

Input borders should meet the WCAG AA contrast ratio requirements #7509

Open
tkajtoch opened this issue Feb 5, 2024 · 2 comments
Open

Input borders should meet the WCAG AA contrast ratio requirements #7509

tkajtoch opened this issue Feb 5, 2024 · 2 comments

Comments

@tkajtoch
Copy link
Member

tkajtoch commented Feb 5, 2024

Describe the problem

According to the recent kibana issue EUI input fields borders have contrast ratios below 3:1 and don't meet the WCAG AA contrast ratio requirement.

The same may apply to other components like EuiTextField, EuiSearchField, EuiSelect, and more.

To Reproduce

Go to https://eui.elastic.co/#/forms/form-controls#text-field and measure EuiTextField border contrast ratio.

Environment

  • Operating System: MacOS 14.2
  • Browser: Chrome 121
  • Environment: production

Proposed solution

Increase affected components' border contrast ratios to 3:1 or above.

Screenshots or Trace Logs

Screenshot 2024-02-05 at 16 27 16
@tkajtoch tkajtoch changed the title Input borders should meet the contrast ratio guidelines Input borders should meet the WCAG AA contrast ratio requirements Feb 5, 2024
@cee-chen
Copy link
Member

cee-chen commented Feb 5, 2024

Worth noting: the password component is dark enough to pass the contrast check - why is it a one-off?

@kyrspl
Copy link
Contributor

kyrspl commented Mar 26, 2024

@cee-chen

Worth noting: the password component is dark enough to pass the contrast check - why is it a one-off?

I noticed that this is true when the dual, or preppend or append parameters are set to true. It seems that this happens because the background of these added elements use a lighter gray (which is the same as the field's border)

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

No branches or pull requests

4 participants