Problem/Motivation
The user interface component of the toggle button to expand or collapse the navigation sidebar is not clearly distinguishable as a button and might go unnoticed cuz the caret facing to the left for LTR also has a lower contrast against the background compared to the caret facing to the right for every top level menu item that contains sub menu items (See the table in
https://docs.google.com/spreadsheets/d/1won35PxhRFexJYE8FmZ4DCNTo7xEAxC8... or toggle_button.xlsx.zip for more details).


Discussed and iterated on the issue with @mgifford, @the_g_bomb, @katannshaw, and @drupa11y
Steps to reproduce
Proposed resolution
- It is not necessarily a compliance issue with WCAG but it would still be good, for the reasons outlined in the problems section, to increase the color contrast of the button border to have a contrast of at least 3:1.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Before.png | 94.47 KB | sdhruvi5142 |
| #13 | After.png | 17.85 KB | sdhruvi5142 |
| #12 | after.png | 11.72 KB | libbna |
| #12 | before.png | 11.34 KB | libbna |
| #8 | right-arrow.png | 196.56 KB | libbna |
Issue fork drupal-3506321
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3506321-increase-the-color
changes, plain diff MR !12735
Comments
Comment #2
mgiffordThe caret facing to the left is more or less invisible to most users I would think. It is too easy to miss as it isn't where folks are looking for this kind of a link.
Comment #3
mgiffordThis isn't a Gin issue specifically.
Comment #4
mgiffordI think the menu module is the right place to do this.
I don't know if this should be just for folks who have configured their browsers correctly, but we can start with them:
It would be interesting to see how that button features in user research. Certainly unsure how it would do with users who are using screen magnifiers.
Comment #5
rkollerthat button is strictly speaking in the navigation module. i posted it in the gin queue as well due to the fact that there is a dark and light mode and navigation in core only has a light mode so far. that was the reasoning behind opening an issue in gin as well.
Comment #6
mgiffordI can move this to the navigation module.
Is there a duplicate issue for this, or are you suggesting there should be another issue opened up?
Comment #7
quietone commentedIn Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies. Thanks
Comment #8
libbna commentedHi,
I checked and compared the colors of both carets. The right caret has a color of #4F5661, which gives a contrast ratio of 7.4:1, while the left caret uses #8590A3, resulting in a lower contrast ratio of 3.22:1.
Just to confirm — would you like me to update the left caret to use the same color as the right (#4F5661) for consistency and better contrast? Please confirm so I can proceed accordingly.
I used the WebAIM Contrast Checker to verify the ratios.
Comment #9
mgiffordYes. That sounds right to me. Using the same color would make it easier to identify. Thanks.
Comment #10
libbna commentedCool. Thanks for confirming. I am working on it.
Comment #12
libbna commentedI have changed the color of the arrow of toggle button to increase the contrast.
Comment #13
sdhruvi5142 commentedHi, I've applied MR!12375 and verfied the changes and they are working as expected.
Testing Steps:
1. Enabled Navigation Module
2. Check the Toggle button color in left drawer
3. Observe the changes there.
Testing Result:
The color of both the toggles look same and the color contrast also got increases. Attaching screenshots fore reference. Can move this to RTBC+1
Status : PASS
Comment #15
nod_Comment #16
ckrinaThe slight color change in the arrow is OK on a visual perspective.
Comment #19
nod_Committed and pushed d6f8e99c4cd to 11.x and 9271a55faa8 to 11.2.x. Thanks!
Comment #21
nod_Comment #22
libbna commented