Opened 7 weeks ago
Last modified 6 days ago
#65153 reopened defect (bug)
Identify selected buttons (.active in button groups) in Windows High Contrast Mode
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-patch |
| Focuses: | accessibility, css | Cc: |
Description (last modified by )
Attachments (2)
Change History (14)
This ticket was mentioned in PR #11680 on WordPress/wordpress-develop by @sabernhardt.
7 weeks ago
#1
- Keywords has-patch added
@
7 weeks ago
Before patch: alignment options in the Image details dialog do not show that 'None' is selected
@wildworks commented on PR #11680:
6 weeks ago
#3
@sabernhardt commented on PR #11680:
5 weeks ago
#4
What are your thoughts on applying a 3px border to all four sides, rather than just the bottom?
That could be better. I also considered a border only on the bottom.
The hover state is the same as the default state:
@wildworks commented on PR #11680:
5 weeks ago
#5
#6
@
4 weeks ago
Agreed with @wildworks — the third approach feels the most natural. Tested it in Windows High Contrast Mode and the active button state is clearly distinguishable without conflicting with the focus outline. The teal border works well for indicating the selected state.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
3 weeks ago
#8
@
3 weeks ago
- Milestone changed from Awaiting Review to 7.1
- Owner set to joedolson
- Status changed from new to accepted
I have some preference for using the first approach, since it would meet WCAG 2.4.13, but it's not required, so I'm willing to bend on that.
#11
@
9 days ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport to 7.0 branch.
#12
@
6 days ago
- Keywords commit dev-feedback removed
The approach using pseudo-elements might not have been the best, as the pseudo-elements get overridden when the button with the dashicon changes to an active state.
<button class="button-primary button dashicons dashicons-admin-generic active">Button</button>
/* Only visible in Windows High Contrast mode */
.wp-core-ui .button.active:before {
content: "";
}
/* This CSS will be overridden. */
.dashicons-admin-generic:before {
content: "\f111";
}
For example, activate the "Publoish setting" button in Customizer. The dashicon will disappear.
By the way, the issue reported here should have been occurring previously, so I don't think it needs to be backported to 7.0.1.

Adds a transparent pseudo-element on active buttons. In Windows High Contrast mode, this shows a thin border on three sides and a thicker border on the bottom.
Using a pseudo-element reduces the chance of confusion with the focus outline, and it does not change the border (and button height) for other users.
Trac 65153
## Screenshots
Screenshots using:
### Permalinks options, showing focus outline on selected post name button
Before

With patch (this also shows hover style on

post_idbutton)### Alignment options
The 'None' button is selected.
#### Selected None button has focus outline
Before

With patch

#### Unselected Left button has focus outline
Before

With patch

## Use of AI Tools
none