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

[Switch] Enhance the component's colors for a11y and usability #10483

Open
2 of 10 tasks
mjuniper opened this issue Oct 3, 2024 · 1 comment
Open
2 of 10 tasks

[Switch] Enhance the component's colors for a11y and usability #10483

mjuniper opened this issue Oct 3, 2024 · 1 comment
Labels
0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. ArcGIS Hub Issues logged by ArcGIS Hub team members. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality visual changes Issues with visual changes that are added for consistency, but are not backwards compatible

Comments

@mjuniper
Copy link
Member

mjuniper commented Oct 3, 2024

Check existing issues

Summary

We got a number of accessibility violations on calcite-switch when LevelAccess audited Hub. See:

I think these boil down to: when the switch is off the track border (--calcite-color-border-2 / #d4d4d4) does not sufficiently contrast with the track background (--calcite-color-foreground-2 / #f3f3f3). It would not sufficiently contrast with even a white (#ffffff) surrounding background either but I think it is sufficient to focus on making its own border and background contrast sufficiently.

Actual Behavior

calcite switch has insufficient contrast between the track border and track background when in the off position.

Blank diagram (5)

Expected Behavior

calcite-switch should have sufficient contrast between the track border and track background when in the off position. I think something like border: #949494 (--calcite-color-border-input) and background #ffffff (--calcite-color-foreground-1) would do it.

Acceptance criteria

  • Update the component's track colors
  • Update border color of the handle
  • Update the component's color on hover
  • Simplify the focus to a single outer ring

image

Reproduction Sample

https://codepen.io/mjuniper/pen/rNXemPZ?editors=100

Reproduction Steps

  1. Visit https://codepen.io/mjuniper/pen/rNXemPZ?editors=100
  2. Observe that the contrast between the track border (#d4d4d4) and the track background (#f3f3f3) is only 1.3
  3. Also observe that the contrast between the track border and the white surrounding background is only 1.48.

Reproduction Version

2.13.0

Working W3C Example/Tutorial

No response

Relevant Info

No response

Regression?

No response

Priority impact

impact - p1 - need for current milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Hub

@mjuniper mjuniper added 0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. p - high Issue should be addressed in the current milestone, impacts component or core functionality labels Oct 3, 2024
@github-actions github-actions bot added ArcGIS Hub Issues logged by ArcGIS Hub team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Oct 3, 2024
@geospatialem geospatialem added the design Issues that need design consultation prior to development. label Nov 5, 2024
@geospatialem
Copy link
Member

Adding design for expertise on any modifications to the switch component's contrast when in the "off" position.

@geospatialem geospatialem added visual changes Issues with visual changes that are added for consistency, but are not backwards compatible enhancement Issues tied to a new feature or request. and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Nov 18, 2024
@geospatialem geospatialem changed the title Insufficient contrast on calcite-switch in the off position [Switch] Enhance the component's colors for a11y and usability Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. ArcGIS Hub Issues logged by ArcGIS Hub team members. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality visual changes Issues with visual changes that are added for consistency, but are not backwards compatible
Projects
None yet
Development

No branches or pull requests

2 participants