-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add support for High Contrast Theme #356
base: main
Are you sure you want to change the base?
Conversation
I think accordion buttons (success criteria) also need to be improved for better usability in contrast mode. When using CCAe without contrast mode, we can clearly see the clickable size and boundary of accordion buttons (success criteria) because each button is distinguished by a specific background color (e.g., black buttons in light mode, gray buttons in dark mode). However, in contrast mode, users cannot distinguish the boundaries of each accordion button. Microsoft addressed this issue by adding borders to buttons in contrast mode. What do you think about adopting a similar approach? |
Sure, I'll do that too :) |
5b9e36b
to
03e0dd8
Compare
Buttons icon are now visible and uses system colors. Since external SVG images can't get dynamically styled, we're adding a pseudo element on buttons, mask it with the appropriate icon, and control the color of the icon through the element background image. This allows us to remove all the *-white.svg images as we can change the color with CSS. We opt-out of forced colors for the elements where we want to apply non-system colors, i.e. the foreground, background and preview sections. detail/summary elements are adapted to look nice in High Contrast Theme.
03e0dd8
to
9ccf45c
Compare
The contrast mode issue(ThePacielloGroup#355, ThePacielloGroup#356) prompted me to revisit the color contrast of the CCA user interface. I identified issues with color contrast across various screen theme modes (e.g., Windows Contrast Theme, Dark Mode, Light Mode), particularly with the fail (X mark) and pass (check mark) icons. To address this, I adjusted the colors to ensure a contrast ratio of at least 4.5:1 in all modes (Light, Dark, and Contrast Mode).
Buttons icon are now visible and uses system colors. Since external SVG images can't get dynamically styled, we're adding a pseudo element on buttons, mask it with the appropriate icon, and control the color of the icon through the element background image. This allows us to remove all the
*-white.svg
images as we can change the color with CSS.We opt-out of forced colors for the elements where we want to apply non-system colors, i.e. the foreground, background and preview sections.
Before vs After