#39970 closed defect (bug) (fixed)
Improve the "dismiss notice" button color contrast
Reported by: | afercia | Owned by: | rianrietveld |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-screenshots color-contrast good-first-bug has-patch |
Focuses: | ui, accessibility | Cc: |
Description
Most of the notices in the admin have a "Dismiss notice" button. Other UI components use similar buttons, for example the media views when there is an upload error (see screenshots below).
These buttons color contrast ratio is too low for accessibility. It would be great to improve it to get a contrast ratio of at least 4.5:1. On a white background, the #72777c
WordPress grey would make it.
Example: the dismiss notice button when updating a post:
Also, it could be a good opportunity to fix an edge case in the media modal. When adding media from the edit post screen and there's an upload error, no "dismiss errors" button gets displayed. However, the button is there and is functional. It's just completely unstyled:
While it's not visible, it can still be focused and activated when using a keyboard or a screen reader. Not sure it this is intentional, but I'd say if this control isn't essential in this context, then it should be completely hidden from all users. Otherwise, it should be styled.
Worth noting the same button in the Media Library grid has a proper styling:
Attachments (6)
Change History (16)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
8 years ago
#2
@
8 years ago
- Keywords good-first-bug added
- Milestone changed from Awaiting Review to Future Release
- Owner set to rianrietveld
- Status changed from new to assigned
#5
follow-up:
↓ 6
@
8 years ago
Hey @chris_dev, thanks for the patch.
Tested this patch at the contributor day at WordCamp London and it work good for all the cases described by @afrecia.
Just one thing: although the colour in .notice-dismiss is overruled by .notice-dismiss:before, we think that the colour #b4b9be
in .notice-dismiss should also be changed into #72777c
in case the class will be used in other cases without the :before.
.notice-dismiss { position: absolute; top: 0; right: 1px; border: none; margin: 0; padding: 9px; background: none; color: #b4b9be; cursor: pointer; }
Maybe it's useful to investigate if there are more cases where #b4b9be
is used.
#6
in reply to:
↑ 5
@
8 years ago
Hi @rianrietveld ,
Thank you for the comments, I'll investigate all stylesheets whether that colour is used or not ant let you know.
#7
@
8 years ago
Hi @rianrietveld ,
I searched all files and found one more it in wp-pointer.css
I added new patch.
#8
@
7 years ago
Refreshed patch to apply cleanly from the root. Also adds hover/focus style for the media upload "dismiss error" button.
Discussed in today's a11y bug-scrub and seems an easy fix, perfect candidate for a contributor day :)