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.
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.
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.
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.
Draft proposal - pending user feedback
Reproduction Sample
https://codepen.io/mjuniper/pen/rNXemPZ?editors=100
Reproduction Steps
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 team
ArcGIS Hub