-
Notifications
You must be signed in to change notification settings - Fork 642
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
Update text colors for hovered/selected elements and add adjacent text to checkbox icons #12213
Update text colors for hovered/selected elements and add adjacent text to checkbox icons #12213
Conversation
DEV-1034 The checkbox icon in lightswitch columns on index pages doesn't meet non-text contrast requirements
Page Area:
Issue Description: The contrast of the checkbox over the background is only 2.6:1 Action: Darken so it's at least 3:1 over the background Screenshot/Code Snippet:
Resolves CMS-276 |
DEV-962 "Remember your password?" and "Forgot your password?" buttons drop below 4.5:1 contrast on hover and focus
Page Area: Login page Issue Description: When hovering/focused, the color drops below 4.5:1 against the background Action: Darken link on hover, or leave text color the same as when un-hovered Screenshot/Code Snippet: N/A Resolves CMS-262 |
DEV-546 Selected element in element tables has a background that is not 3:1 against adjacent, unselected elements
The background color of the cells in a selected element row is only 1.44:1 against the adjacent, unselected elements (#CDD8E4 against #FFFFFF) Add an outline or darken the background color of cells to achieve at least 3:1 ratio against adjacent cells, or provide another visual indicator of selected state. Screen Shot 2022-04-19 at 9.08.51 AM.png Resolves CMS-190 |
…itch-columns # Conflicts: # src/web/assets/cp/dist/css/cp.css # src/web/assets/cp/dist/css/cp.css.map # src/web/assets/graphiql/dist/css/graphiql.css.map # src/web/assets/installer/dist/css/install.css.map # src/web/assets/login/dist/css/login.css.map # src/web/assets/plugins/dist/css/PluginManager.css.map # src/web/assets/pluginstore/dist/css/app.css.map # src/web/assets/routes/dist/css/routes.css.map # src/web/assets/systemmessages/dist/css/system_messages.css.map # src/web/assets/updates/dist/css/UpdatesUtility.css.map # src/web/assets/upgrade/dist/css/UpgradeUtility.css.map
For DEV-1034, why can’t we just darken the checkmark color? |
We certainly could. I was torn between this solution and just updating the color to ensure it's 3:1 against each background color; I think it would require a lighter green or white color in the "selected" state. I opted for this solution to have some visual consistency between this and the status indicator change in this PR (i.e. an icon that doesn't change color based the element state, next to text that always meets the minimum contrast ratio for text). |
Ah true, it would be good to stay consistent with the “enabled” green color. I’d be OK with a white checkbox over a green background, if that’s acceptable. |
I don’t really care for the “Enabled” label since that doesn’t always make sense for the context. For example “Enabled” would be a confusing label for a Lightswitch field labeled “Featured entry?”. We could maybe add a setting for the “Enabled” label text, but if there’s a way to solve this without the label, I’d prefer that. |
… for icon text alternative where there is one set
@brandonkelly, this is ready for review again. I’ve made the stylistic change and ensured the custom “On” label is used as the text alternative when there is one set. |
…itch-columns # Conflicts: # src/web/assets/cp/dist/css/cp.css # src/web/assets/cp/dist/css/cp.css.map # src/web/assets/craftsupport/dist/css/CraftSupportWidget.css.map # src/web/assets/dashboard/dist/css/Dashboard.css.map # src/web/assets/edittransform/dist/css/transforms.css.map # src/web/assets/edituser/dist/css/AccountSettingsForm.css.map # src/web/assets/edituser/dist/css/profile.css.map # src/web/assets/generalsettings/dist/css/rebrand.css.map # src/web/assets/graphiql/dist/css/graphiql.css.map # src/web/assets/installer/dist/css/install.css.map # src/web/assets/login/dist/css/login.css.map # src/web/assets/money/dist/css/Money.css.map # src/web/assets/plugins/dist/css/PluginManager.css.map # src/web/assets/pluginstore/dist/css/app.css.map # src/web/assets/pluginstore/dist/js/app.js # src/web/assets/pluginstore/dist/js/app.js.map # src/web/assets/pluginstoreoauth/dist/css/PluginStoreOauthCallback.css.map # src/web/assets/routes/dist/css/routes.css.map # src/web/assets/systemmessages/dist/css/system_messages.css.map # src/web/assets/updater/dist/css/Updater.css.map # src/web/assets/updates/dist/css/UpdatesUtility.css.map # src/web/assets/upgrade/dist/css/UpgradeUtility.css.map # src/web/assets/userpermissions/dist/css/UserPermissions.css.map # src/web/assets/utilities/dist/css/utilities.css.map
Lightened up the selected BG color a bit, to be consistent with the selected source item, the selected source path item (#12564), and hovered disclosure menu items. |
@brandonkelly good call, the lighter color does indeed provide enough contrast! |
…itch-columns # Conflicts: # src/web/assets/cp/dist/css/cp.css # src/web/assets/cp/dist/css/cp.css.map # src/web/assets/pluginstore/dist/css/app.css.map
Sweet! Merged 🎉 |
Description
Makes the following changes:
Related issues
Resolves DEV-1034, DEV-962, DEV-546