Opened 9 years ago
Closed 5 years ago
#35596 closed defect (bug) (fixed)
Color contrast: checkboxes and radio buttons
Reported by: | afercia | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-screenshots color-contrast has-patch ui-feedback form-controls |
Focuses: | ui, accessibility | Cc: |
Description
See related #31713.
As part of the effort to audit color contrast in the admin and make the contrast ratio at least 4.5:1 (WCAG AA level) it would be important to consider also form controls.
Starting with checkboxes and radio buttons, some browsers allow them to be styled, some don't. The actual rendering of these controls also varies depending on the operating system but where the styles provided by WordPress apply (basically on Webkit browsers), the color contrast is really low.
See in the screenshot below, checkboxes in latest Chrome and Firefox on Windows 10:
Form controls are such a fundamental part of any user interaction and should be clearly visible to all users, also low vision or color blind users.
We've discussed a bit this issue in the accessibility team and there's no objection to style them, by the way the border color should maybe standardize to a darker one, like Firefox does.
Any thoughts and patches welcome :)
Attachments (3)
Change History (30)
This ticket was mentioned in Slack in #design by afercia. View the logs.
9 years ago
#3
@
9 years ago
- Keywords has-patch added; needs-patch removed
Hey! :)
My patch changes the border color of radio buttons and checkboxes to black, in the screenshot on the left side Firefox, on the right Chrome on Windows 10.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
9 years ago
#5
@
9 years ago
Changing the color to #000 seems very dark, what about 555D66?
The contrast will be sufficient too.
555D66 is a WordPress color, see http://codepen.io/hugobaeta/full/RNOzoV/
#6
@
9 years ago
Oh, thanks for the Link, I didn’t had the WordPress colors in mind. I will upload a new patch with 555D66 tomorrow!
#7
@
9 years ago
35596.2.patch changes the border color from b4b9be to 555d66. Firefox on the left, Chrome on the right.
#8
@
9 years ago
- Keywords ui-feedback added
It seems to me 35596.2.patch it's a reasonable change and an improvement for accessibility. By the way, I admit it should be probably be considered together with other borders used for form elements. Inputs, selects, etc. would probably need a slightly darker border color. See screenshot below. Worth noting the different border color between different form element types is what Firefox users see every day.
A patch would be simple, just needs some thoughtful design feedback :)
#9
@
9 years ago
At the accessibility team, this week we should be able to do a test about this checkboxes/radio implementation: http://www.getmdl.io/components/index.html#toggles-section/checkbox
Designers welcome too. By the way, investigation and gathering consensus would require time and about the release schedule, it's very likely this ticket can't be completed before 4.5 RC.
This ticket was mentioned in Slack in #core by chriscct7. View the logs.
9 years ago
#11
@
9 years ago
- Milestone changed from 4.5 to Future Release
Punted per comment:9 and discussion in trac.
#12
@
8 years ago
Since core is already styling radio buttons, what about styling checkboxes too? See for example: https://standards.usa.gov/form-controls/#checkboxes
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
8 years ago
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
8 years ago
#15
@
8 years ago
Discussed this in the accessibility meeting today, and have concluded that there's no benefit at this time to attempting to resolve issues with cross-browser support for input element styles, but any styles that WordPress imposes need to be compliant with WCAG 2.0 color guidelines where they are applied.
This ticket was mentioned in Slack in #design by afercia. View the logs.
8 years ago
This ticket was mentioned in Slack in #design by karmatosed. View the logs.
7 years ago
#19
@
7 years ago
It would be nice to take a look at all of the form styles more holistically. I'd love to see someone bring all the form items in core into something like a CodePen so it's easy to share, and then work on tweaking all the colors to match and pass contrast guidelines.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
7 years ago
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
7 years ago
#22
@
7 years ago
@afercia: 35596.3.patch is a refresh of nr 2.
Enhances colour contrast for radio buttons and check boxes.
Tested in Firefox/Safari/Chrome/Edge/IE11.
Doesn't work in Firefox and IE11, as expected.
But it seems like IE11 already has a default darker border.
This ticket was mentioned in Slack in #accessibility by rianrietveld. View the logs.
7 years ago
#24
@
6 years ago
Interestingly, Gutenberg is going to redesign the checkboxes. See https://github.com/WordPress/gutenberg/pull/8588
Changing the border color of checkbox and radion form control from #b4b9be to #000