-
Notifications
You must be signed in to change notification settings - Fork 7
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
a11y: Add token to support disabled text #195
Comments
This commit creates a new semantic token specifically to be used in UIs where the content of an interaction is to appear as disabled to the end user. This new token may be used in cases where there is unavailable features in the UI that are not specifically interactive elements. On branch dsande/disabledText/195 Changes to be committed: modified: src/color/text.json
@blackfalcon we currently already have these two tokens for this purpose defined: --ds-color-text-ui-disabled-default: #adadad;
--ds-color-text-ui-disabled-inverse: #7e7e7e; @nklansford We need to make sure we consider this as part of the semantic token conversations that are ongoing. |
Hey @jason-capsule42 I did see those tokens in there, but I am unsure as to the rules for using Also, there is a suggested change to a token to use If the decision is to retain only the |
Totally agree with where your head is at on this @blackfalcon. There is a conversation being headed up by @nklansford assessing our semantic naming convention. As more teams are being required to use the tokens to support dual brand theming the complexity of the naming solution in place and the confusion arising from that is showing itself. There is movement to simplify the semantic token names, make them much more obvious about which to use and where and hopefully prevent issues exactly like this in the future. |
I am going to move this to BLOCKED until the new naming convention is resolved and then I'll come back to this ticket. |
Is your feature request related to a problem? Please describe.
In reviewing Flight Search for accessibility issues, I came across the UI attached to this issue.
The CSS is written as
The code
color: var(--ds-color-border-disabled-default);
is the focus of this issue.--ds-color-border-disabled-default
is not the right token to be used for text--ds-color-border-disabled-default
is a deprecated tokenDescribe the solution you'd like
New tokens specifically for disabled text is requested.
According to WCAG 2.1 - Success Criterion 1.4.11: Non-Text Contrast, this requires a minimum 3:1 contrast ratio for graphical elements and states that it applies to "inactive user interface components," such as disabled text.
The closeted existing Auro token would be
var(--ds-color-base-gray-500)
with a hex value of#959595
which barely meets the 3:1 contrast requirement (2.99:1) but can be considered an acceptable option for disabled text.For the inverse,
var(--ds-color-base-gray-600)
with a hex value of#7e7e7e
would meet the 3.1 color contrast ratio 3.1 requirements (3.5:1) using thevar(--ds-color-background-primary-100-inverse)
token with hex value of#0e2b4f
as an inverse background.I'd also recommend that the token
var(--ds-color-text-ui-disabled-default)
be updated to aliascolor.base.gray.500.value
to support the#959595
hex value that meets the 3:1 contrast requirement.Describe alternatives you've considered
The cost of doing nothing is the following; endangerment of not providing a semantic token for disabled text which will result in inconsistent theme updates going forward and the possibility of disengaging users with low-vision impairments and/or color blindness issues.
Additional context
Related issue for flight search team
Exit criteria
This issue can be closed once the requested tokens have been made available for consumption by UI development teams.
The text was updated successfully, but these errors were encountered: