Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#48578 closed enhancement (fixed)

Change health check accordion appearance on focus

Reported by: mensmaximus Owned by: audrasjb
Priority: normal Milestone: 5.4
Component: Site Health Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses: ui, accessibility, administration

Description

The accordion items on the health check page get an outline on focus. This looks annoying given the new admin css. I would rather suggest a background color on focus.

status quo:

.health-check-accordion-trigger:focus {
color: #191e23;
border: none;
box-shadow: none;
outline-offset: -2px;
outline: 1px dotted #555d66;
}

suggestion:

.health-check-accordion-trigger:focus {
color: #191e23;
border: none;
box-shadow: none;
background-color: #eee;
}

Attachments (2)

4c4972edb452a71bae7f4c254888cfd0.gif (1.2 MB ) - added by audrasjb 7 years ago.
48578.diff
48578.diff (454 bytes ) - added by audrasjb 7 years ago.
Test with WP 5.3 styles and a -1px outline focus

Download all attachments as: .zip

Change History (15)

#1 @mensmaximus
7 years ago

  • Summary Change health check accordino appearance on focusChange health check accordion appearance on focus
  • Version 5.3trunk

#2 @SergeyBiryukov
7 years ago

  • Component GeneralSite Health
  • Focuses accessibility added

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 years ago

#4 @afercia
7 years ago

  • Keywords needs-design-feedback added; 2nd-opinion removed

Focus indication can't be done with color alone, as it wouldn't be perceived by some users e.g. users with color perception impairments or low vision. That's the reason why the browsers native focus style uses a shape. In the same way, a custom style needs to use a shape.

Improvements are always welcome. If the design team feels like exploring a new focus style, the accessibility team has no objections as long as it uses also a shape.

#5 @mensmaximus
7 years ago

Thank you for this insight on accessibility. I understand the concerns, so why not simply adapting styles from other elements like wp-core-ui buttons.

Suggestion:

.health-check-accordion-trigger:focus {
	color: #191e23;
	border: none;
	box-shadow: none;
	outline-offset: -2px;
	outline: 2px solid #0071a1;
	background-color: #f8f9f9;
}

@audrasjb
7 years ago

Test with WP 5.3 styles and a -1px outline focus

#6 @audrasjb
7 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review5.4
  • Severity trivialnormal
  • Version trunk

Hi,

First, Let's add this ticket to milestone 5.4 :-)

In 48678.diff, I tested the following CSS rule:

.health-check-accordion-trigger:focus {
	color: #191e23;
	border: none;
	box-shadow: none;
	outline-offset: -1px;
	outline: 2px solid #0071a1;
	background-color: #f8f9f9;
}

The outline-offset: -1px looks better to me than -2px.
See the above animated screenshot for reference.

Cheers,
Jb

#7 @melchoyce
7 years ago

  • Keywords needs-design-feedback removed

Design looks good to me 👍

This ticket was mentioned in Slack in #accessibility by xkon. View the logs.


7 years ago

This ticket was mentioned in Slack in #core-site-health by clorith. View the logs.


7 years ago

#10 @Clorith
7 years ago

  • Keywords commit added

I like this, and with design sign-off I'm happy to mark this for commit.

This ticket was mentioned in Slack in #accessibility by audrasjb. View the logs.


7 years ago

#12 @audrasjb
7 years ago

  • Owner set to audrasjb
  • Status newaccepted

Hi,
The patch still applies cleanly, I can confirm it's ready to be committed as it :-)

#13 @SergeyBiryukov
7 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 47188:

Site Health: Improve focus style for accordion items on Site Health screens.

The new style is more consistent with other elements like .wp-core-ui buttons.

Props audrasjb, mensmaximus, afercia, melchoyce, Clorith.
Fixes #48578.

Note: See TracTickets for help on using tickets.