Skip to content

Conversation

@Fredx87
Copy link
Contributor

@Fredx87 Fredx87 commented Nov 25, 2025

Description

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.
The guidelines suggest adjusting the border colors by applying offsets, the approach has been extended to take into account all form controls.

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, and update the wysiwyg package that includes improved color contrast as well

Screenshots

Before:
Screenshot 2025-11-27 at 10-14-19 Submit a request – z3ngianluca999

After:
Screenshot 2025-11-27 at 10-16-15 Submit a request – z3ngianluca999

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

@Fredx87 Fredx87 force-pushed the gianluca/GA11YFIX-467/form-controls-contrast branch 4 times, most recently from a3a68ee to 3dae074 Compare November 25, 2025 15:31
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.
The guidelines suggest adjusting the border colors by applying offsets,
the approach has been extended to take into accounts all form controls.

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.
Update @zendesk/help-center-wysiwyg to version 0.2.0 to enhance
the contrast of form controls, ensuring better accessibility and
usability for all users.
@Fredx87 Fredx87 force-pushed the gianluca/GA11YFIX-467/form-controls-contrast branch from bb00155 to d2264e0 Compare November 27, 2025 09:36
@Fredx87 Fredx87 requested a review from a team November 27, 2025 09:37
@Fredx87 Fredx87 marked this pull request as ready for review November 27, 2025 09:38
@Fredx87 Fredx87 requested a review from a team as a code owner November 27, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants