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

[EuiCheckBox] The contrast ratio of unchecked checkboxes is below the WCAG threshold #6690

Closed
morhof opened this issue Apr 5, 2023 · 8 comments · Fixed by #6729
Closed

Comments

@morhof
Copy link

morhof commented Apr 5, 2023

WCAG success criterion 1.4.11 - non-text contrast - AA

Steps to reproduce

  1. Open Dashboard

image

Actual Result

  • The following contrast ratios of interactive elements do not conform to the minimum contrast requirements of 3:1. Therefore, these elements are more difficult to perceive, and may be completely missed by users with low vision:
    Borders of checkboxes 1,6:1,
    Toggle-switches 1,2:1.

Expected Result

  • Between foreground and background, the minimum contrast ratio should be 3:1.

Meta Issue
n.a.

Kibana Version:
8.3
OS:
Microsoft Windows 10 Enterprise (64-bit)
Browser:
Google Chrome 109.0.5414.75 (64-Bit)

Screen reader:
n.a.

Relevant WCAG Criteria:
WCAG success criterion 1.4.11 - non-text contrast - AA
https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html

Relevant ARIA spec:
n.a.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@elasticmachine

This comment was marked as outdated.

@nreese
Copy link
Contributor

nreese commented Apr 5, 2023

Closing, since these are EUI components, https://elastic.github.io/eui/#/forms/selection-controls#checkbox, and changes need to be made in EUI

@nreese nreese closed this as completed Apr 5, 2023
@bhavyarm

This comment was marked as outdated.

@bhavyarm bhavyarm reopened this Apr 5, 2023
@nreese

This comment was marked as outdated.

@cee-chen
Copy link
Contributor

cee-chen commented Apr 5, 2023

Instead of closing, any objection to transferring/moving this to the EUI repo?

@1Copenut can you also chime in on this? I was personally not familiar w/ contrast ratio requirements for non-text elements. This feels like it'll impact many more things (such as EuiFieldText) etc. as well.

@cee-chen
Copy link
Contributor

cee-chen commented Apr 5, 2023

#6692 also seems related to this.

👋 Removing tags and transferring this to https://github.com/elastic/eui, along with several other EUI-specific issues

@cee-chen cee-chen transferred this issue from elastic/kibana Apr 5, 2023
@cee-chen cee-chen changed the title (Accessibility) The contrast ratio of some graphical elements is below the threshold - example 1 [EuiCheckBox] The contrast ratio of unchecked checkboxes is below the WCAG threshold Apr 5, 2023
@1Copenut
Copy link
Contributor

1Copenut commented Apr 5, 2023

@1Copenut can you also chime in on this? I was personally not familiar w/ contrast ratio requirements for non-text elements. This feels like it'll impact many more things (such as EuiFieldText) etc. as well.

@cee-chen It very well might affect other components. The spec for SC 1.4.11 Non-text Contrast (Level AA)(https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html) says elements must have a 3:1 color contrast ratio to adjacent colors. It's a hard one to spot for, so I'm glad a screenshot was provided.

In the example our light gray checkbox borders would need to be darkened so they are 3:1 with the white background. Same contrast ratio would apply for dark mode, but if we get one operating correctly, that gives us a starting point.

Spec 1.4.11 also has guidance that disabled elements do not have to meet the 3:1 threshold:

User Interface Components that are not available for user interaction (e.g., a disabled control in HTML) are not required to meet contrast requirements in WCAG 2.1. An inactive user interface component is visible but not currently operable. An example would be a submit button at the bottom of a form that is visible but cannot be activated until all the required fields in the form are completed.
https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#inactive-controls

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

Successfully merging a pull request may close this issue.

7 participants