Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Switch: contrast of disabled switch label is not enough #684

Closed
ursula-wieshofer opened this issue Mar 2, 2020 · 4 comments · Fixed by #702
Closed

Switch: contrast of disabled switch label is not enough #684

ursula-wieshofer opened this issue Mar 2, 2020 · 4 comments · Fixed by #702
Assignees
Labels
bug A broken behaviour that was working previously has-pr

Comments

@ursula-wieshofer
Copy link
Contributor

Bug Report

Expected Behavior

When a switch is disabled, the switch itself should change the color, but not the text/ label next to the switch, as users should still be able to read this. With the current text color we don't meet our accessibility standards ;)

Possible Solution

Best solution would be to disable the switch but not the text / label. The label should be visible in our standard font color.

Screenshot 2020-03-02 at 13 55 54

@ursula-wieshofer ursula-wieshofer added the bug A broken behaviour that was working previously label Mar 2, 2020
@tomheller
Copy link
Collaborator

Thank you for reporting this, @ursula-wieshofer. This seems like a valid request.

@tomheller tomheller added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 3, 2020
@tomheller
Copy link
Collaborator

@ursula-wieshofer Did you check the other input types here as well? At first glance there seem to be a couple that suffer that issue:

Radio button:
Radio button - disabled label not showing enough contrast

Form field placeholders and hints:
Form field with placeholder text and hints showing not enough contrast

Checkbox:
Checkbox disabled label not showing enough contrast

There would be automatic contrast checks in our a11y tests, but we have disabled most of them right now, as they would crash the builds of our design system. If this is something we want to tackle soon, we can go over the violations offline.

@ursula-wieshofer
Copy link
Contributor Author

ursula-wieshofer commented Mar 6, 2020

@tomheller imho I think we should change the fonts for all these components. Thx very much for bringing this up ;)

tomheller added a commit that referenced this issue Mar 6, 2020
…rast color now.

Due to low contrast ratios on between disabled labels on the radio, checkbox and switch we decided
in #684 to use the default text color for the labels. This results in a higher contrast ration
between the label and the background, which improves readability.

Fixes #684
tomheller added a commit that referenced this issue Mar 6, 2020
…rast color now.

Due to low contrast ratios on between disabled labels on the radio, checkbox and switch we decided
in #684 to use the default text color for the labels. This results in a higher contrast ratio
between the label and the background, which improves readability.

Fixes #684
@tomheller
Copy link
Collaborator

I'm fixing the radio, checkbox and switch labels within the #702.
@ursula-wieshofer I think we should discuss placeholder texts in general, as they are a highly controversial topic.
If we make the change to the placeholder texts within the input and form fields, they will be visually the same as if the user would have entered a value. This tends to get confusing and does not help the user to determine which fields should be filled out and which ones already have values in them.

@tomheller tomheller removed good first issue Good for newcomers help wanted Extra attention is needed labels Mar 6, 2020
@tomheller tomheller self-assigned this Mar 6, 2020
lukasholzer pushed a commit that referenced this issue Mar 9, 2020
…rast color now.

Due to low contrast ratios on between disabled labels on the radio, checkbox and switch we decided
in #684 to use the default text color for the labels. This results in a higher contrast ratio
between the label and the background, which improves readability.

Fixes #684
github-actions bot pushed a commit that referenced this issue Mar 9, 2020
…rast color now.

Due to low contrast ratios on between disabled labels on the radio, checkbox and switch we decided
in #684 to use the default text color for the labels. This results in a higher contrast ratio
between the label and the background, which improves readability.

Fixes #684
github-actions bot pushed a commit that referenced this issue Mar 9, 2020
…rast color now.

Due to low contrast ratios on between disabled labels on the radio, checkbox and switch we decided
in #684 to use the default text color for the labels. This results in a higher contrast ratio
between the label and the background, which improves readability.

Fixes #684
yngrdyn pushed a commit to yngrdyn/barista that referenced this issue Nov 9, 2020
…rast color now.

Due to low contrast ratios on between disabled labels on the radio, checkbox and switch we decided
in dynatrace-oss#684 to use the default text color for the labels. This results in a higher contrast ratio
between the label and the background, which improves readability.

Fixes dynatrace-oss#684
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A broken behaviour that was working previously has-pr
Projects
None yet
2 participants