-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Content switcher carries the same visual weight as the primary button. #7509
Comments
@carbon-design-system/design proposal to lower the contrast of the content switchers selected...switch so it doesn't have the same visual weight as a call to action button (for example) We can track any accessibility issues with the Content Switcher Component in #6745 and we can discuss visual weight concerns in this issue. |
@aagonzales With a small tweak to the borders that approach should comply with contrast accessibility rules. I went ahead and mocked it up with the necessary borders and threw in a few alternatives here: https://ibm.invisionapp.com/share/MHO16NYFBPK#/screens/319971991?browse |
Great article in this space https://medium.com/tap-to-dismiss/a-better-segmented-control-9e662de2ef57 👀 |
Link to the updated designs and completed sketch symbols: https://ibm.box.com/s/0tfwkywn8a4ym8zv2vt82d9qitagx2oq |
@aagonzales I like what you and Mitchell have sketched out. |
Hey, as @aagonzales raised attention to this after yesterday's DSAG meeting, I gave it a stab and created some variants based on the previous work done by Mitchell, @noah-kawashbarnes and @aagonzales. Figma file: https://www.figma.com/design/FEKeP8Lv9ZH6gJoh7anJoN Version 1—4 use a lighter background for the selected option and a darker background for the unselected options. I'd suggest to go with V5 if we would have two varying stylings of the content switcher (high contrast / low contrast). |
I don’t think there is an issue. It’s easy to make it one but is it really? From the exploration in Figma, I think V2 works the clearest except in the Disabled state. The selected type is lighter than the deselected type. I think this needs to be reversed so the selected type is slightly darker than the deselected type colors. It should be as though the entire disabled state is just a faded version of the enabled. |
I think V2 distinguishes the Content Switcher from the button more as well, and although V5 is not necessarily a bad design, it has a higher level of similarity to the button. |
@mjabbink @Jonathan-Bruckbauer I've got two points of feedback:
|
@mjabbink and I were exploring some things and we think something like this could work if it passes all the accessibility checks. Or with rounded corner for selected |
A few updates on this work — 8/14 Carbon Office Hours:I presented this topic to the group and we discussed all of the explorations above. Key takeaways:
8/20 Carbon Office Hours:I presented our top choices back to the group in context with different screens and themes. Key takeaways:
Final review
|
The content switcher’s visual weight equals that of the primary button, dividing the user’s attention and preventing them from easily identifying the primary action on the page.
Detailed Description
The current design uses high contrast to help the user distinguish which of the content switcher options are selected, but in many cases this contrast makes the content switcher appear too prominently on the page, or it directly conflicts with the primary button component. Overcoming this issue is difficult as concept itself relies on contrast to make the selected option obvious to the user. To add to this difficulty, accessibility concerns have also been raised in regard to the contrast between the content switcher’s unselected items, and the theme backgrounds.
A proposed solution is to provide a second content switcher option, which would have a lower visual weight than the original design, but still retains enough contrast to meet WCAG requirements and provide the user with an easily identifiable ‘selected’ state.
All of the following designs have been tested against the accessibility concerns raised here and are compliant with WCAG contrast regulations. These designs have also been tested to ensure they are as usable as the current design, and that users are able to easily identify which item is selected, even when using the 2-option variant.
White Theme
Grey 10 Theme
Grey 90 Theme
Grey 100 Theme
The text was updated successfully, but these errors were encountered: