Commit a878119
committed
feat: improve form controls border contrast for accessibility
The default border colors for form controls in the default theme in Zendesk Garden
don't meet the minimum 3:1 contrast ratio against the background.
We apply a custom theme override to increase the contrast of these borders,
following the guidelines provided by the Garden team in an internal doc.
By default, Garden sets the `grey.300` color as the default border color
in the light theme, and then it is increased by 100 for form controls,
which is not sufficient, providing only 2:1 contrast ratio.
To reach the 3:1 ratio, we need to use `grey.600` and so
we apply an offset of 300.
We also enhance the hover state border color, which by default is less
prominent when the border color is darker.
We also update the `$high-contrast-border-color` Sass variable
to match the new border color used in the theme override.1 parent 9be8842 commit a878119
2 files changed
+30
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
17 | 41 | | |
18 | 42 | | |
19 | 43 | | |
| |||
56 | 80 | | |
57 | 81 | | |
58 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
59 | 87 | | |
60 | 88 | | |
61 | 89 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments