-
Notifications
You must be signed in to change notification settings - Fork 638
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
Darken input borders to meet minimum contrast for UI components #12313
base: 5.x
Are you sure you want to change the base?
Conversation
DEV-515 Radio button and checkbox field borders have insufficient contrast against background
The border for these elements is under 2:1 against the white form background These element borders should be darkened so that they meet the 3:1 contrast ratio prescribed for user interface components Screen Shot 2022-04-18 at 12.16.37 PM.png Resolves CMS-162 DEV-322 Text inputs without placeholder text do not have a high enough contrast ratio against the background
Screen Shot 2022-03-14 at 3.19.04 PM.png When text inputs do not have placeholder text, their borders do not meet contrast requirements for non-text content. The current contrast ratio is 1.58:1 on white backgrounds, and 1.24:1 on the global gray background. The color should be changed to a blue of #688aac to be a dark enough outline on all backgrounds. Resolves CMS-041 DEV-317 "Keep me logged in" checkbox doesn't meet minimum contrast guidelines
The contrast of the checkbox outline against the page background is 1.74:1. This should be darkened to achieve a contrast ratio of 3:1 for graphical user interface components CMS-038 |
# 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/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
That feels really harsh to my eyes. Would it be OK to only do this for |
After some additional research, a new accessibility preference sounds like a good idea for this change, as high contrast modes can have usability implications for some users. However, we do have to ensure that the path to enable this setting does meet minimum contrast requirements. This path includes:
I like your idea of having a preference versus using I’ve created #12517 to ensure the Account menu meets the minimum contrast for UI components; however, if we’re using a checkbox-style option (i.e., “Enable high contrast mode”), checkbox borders would still need to be darkened. Thoughts? |
Think this goes back to coming up with some sort of account setup wizard, which could be presented to users when they first log into the control panel, which presents them with all the accessibility preferences. Accounts can default to having any relevant accessibility settings enabled by default to ensure the wizard meets the necessary criteria. |
So for the purposes of this PR, let’s just add the preference and not worry about whether the screens leading up to it are compliant. |
@brandonkelly user preference added! For simplicity, I reverted some changes to remove the extra |
@brandonkelly I was revisiting this PR about disabled element contrast inside indexes. I wonder if this “Increase contrast” setting would be a good candidate for looping in the "disabled elements get italicized text” update. To clarify, we can create some accessibility documentation in the docs that outline all the UI changes bundled with that user setting; this would also help us achieve the ATAG requirement for documenting accessibility features. |
Description
Inputs (text, radio, checkbox, etc.) should meet 3:1 color contrast against page background per 1.4.11: Non-Text Contrast. This PR introduces a new CSS variables for input border and input border color to manage field borders throughout the control panel.
Related issues
Resolves DEV-515, DEV-322, DEV-317