#28267 closed defect (bug) (fixed)
Unify focus styles across the admin
Reported by: | helen | Owned by: | helen |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | ui, administration | Cc: |
Description
We spent a fair bit of time in 3.9 getting focus styles on inputs feeling both noticeable and beautiful, and we should now bring that to more places in the admin. For instance, the dotted outline around text links now feels clunky in comparison.
Attachments (10)
Change History (48)
#3
@
10 years ago
I attached a patch that applies box-shadow styles to a:focus elements similar to input:focus
#5
@
10 years ago
It mimics the default user agent style for focussed elements, which I think is the expected behavior for keyboard navigation users. The goal of focus styles is not to be subtle, but to help users see the currently focussed element clearly. In areas like the media modal it can be difficult to follow the tab index around the various sections, so something more visible is needed. Having the focus be hard to see or radically different between elements can make it hard to tell where you are.
#6
follow-up:
↓ 7
@
10 years ago
The active style is wonky-as-in-ugly and we just should just remove that rule, I think, but the focus style is better and is consistent with Webkit's treatment, just as we've done for inputs. I would like to find a way to also add outline: #5b9dd9 solid 1px;
if at all possible, as the box-shadow can get cut off and isn't supported in < IE9. Unfortunately, Firefox does this (I know, my preferred browser is letting me down):
#7
in reply to:
↑ 6
@
10 years ago
Replying to helen:
I would like to find a way to also add
outline: #5b9dd9 solid 1px;
if at all possible
... Duh, self, multiple box-shadows.
This ticket was mentioned in IRC in #wordpress-ui by helen. View the logs.
10 years ago
This ticket was mentioned in IRC in #wordpress-ui by helen. View the logs.
10 years ago
#12
@
10 years ago
Helen: I took a look at this over the weekend, following our discussion during the accessibility team meeting. I agree with Joe Dolson:
- It looks good in most places. Some spots could use some styling work as the border gets cut off in spots.
- It doesn't matter which method we use: outline, border, etc. We just need to provide a method that doesn't reply on color alone. I like that you're experimenting here! Focus styles can be beautiful too.
- The main navigation on the left could use help too, as Joe said. It needs an non-color reliant indicator too.
Hope this helps!
This ticket was mentioned in IRC in #wordpress-ui by accessiblejoe. View the logs.
10 years ago
This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.
10 years ago
@
10 years ago
Proposed improved focus styling for Customizer sections and panel headings. It's bold, colorful, and similar to things that have been both proposed an in core in the past. Does work reasonably well with color schemes, could be a bit better.
@
10 years ago
In the Customizer, accordion section hover and focus styles match open/active-section title styles. We should maintain this patter but introduce more contrast.
This ticket was mentioned in IRC in #wordpress-ui by davidakennedy. View the logs.
10 years ago
#16
@
10 years ago
hi,
Firefox treats links states a bit differently from Webkit and when you click a link, while it's still "clicked", it's "active" and also "focused" so the box-shadow will be displayed on clicks too. See attached screenshot.
You should probably reset box-shadow on "active" state.
#18
follow-up:
↓ 19
@
10 years ago
I did some testing and experimentation this week with the focus styles specifically for the navigation area on the left-hand side. We talked about it a bit in our last accessibility team meeting. What about something like this?
We can use borders (around all four sides) with the colors I have below. And for the "active/current" page, we can use borders around three sides (top, left, bottom), excluding the right where the little arrow is. That way, the border does not conflict with it. Very similar to what was proposed on the accessibility team blog: https://make.wordpress.org/accessibility/2014/06/25/visual-focus-indication-in-left-navigation/
Colors:
Default: White (fff) border on items
Light: Black (333) border on items
Blue: Black (333) border on items
Coffeee: White (fff) border on items
Ectoplasm: White (fff) border on items
Midnight: White (fff) border on items
Ocean: Black (150404 - note: fff just misses WCAG 2.0 contrast mark) border on items
Sunrise: White (fff) border on items
We might have to make some padding adjustments because of the spacing the borders add, but it shouldn't be too bad.
#19
in reply to:
↑ 18
;
follow-up:
↓ 20
@
10 years ago
Replying to davidakennedy:
We might have to make some padding adjustments because of the spacing the borders add
hi, using multiple box-shadows would not require padding adjustments. Something like this on the current menu item:
box-shadow: inset 2px 0 0 0 #fff, -2px 0 0 2px #fff; z-index: 4;
and something similar can be done for submenu items.
#20
in reply to:
↑ 19
;
follow-up:
↓ 21
@
10 years ago
Replying to afercia:
Replying to davidakennedy:
We might have to make some padding adjustments because of the spacing the borders add
hi, using multiple box-shadows would not require padding adjustments. Something like this on the current menu item:
box-shadow: inset 2px 0 0 0 #fff, -2px 0 0 2px #fff; z-index: 4;and something similar can be done for submenu items.
That's a great idea! But we're shooting for something different for the Admin menu and Toolbar. That's still the case as far as I know. See: https://core.trac.wordpress.org/ticket/28267?replyto=19#comment:9
Other suggestions are welcome!
#21
in reply to:
↑ 20
@
10 years ago
Replying to davidakennedy:
That's a great idea! But we're shooting for something different for the Admin menu and Toolbar. That's still the case as far as I know. See: https://core.trac.wordpress.org/ticket/28267?replyto=19#comment:9
Other suggestions are welcome!
I thought Helen was referring to the "Webkit style" box-shadows currently used on generic links:
and that makes sense, but what about using specifically crafted box-shadows for the Admin menu and Toolbar? White solid ones will look as the ones suggested by the accessibility team, unless I'm missing something.
This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.
10 years ago
This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.
10 years ago
#26
@
10 years ago
A few focus-related issues that I'm seeing:
- The focus style for themes in the theme browser still uses a dotted outline rather than our nice blue outline.
- The focus style on primary buttons has been lost if you're not using the default colour scheme.
- The focus style on the actual tabs for the Help and Screen Options tabs is still poor. Especially noticeable if you've just used the "Skip to main content" link.
Non-default colour scheme button focus style before:
Non-default colour scheme button focus style after:
Theme browser focus style:
Help / Screen Options focus style:
#28
@
10 years ago
[29466] doesn't update editor.css and jquery-ui-dialog.css, while these files use the same rules. (I added a note on top of the buttons.css file last cycle btw, and this is partly my fault as I submitted an incomplete patch, not following my own advice.)
This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.
10 years ago
#31
@
10 years ago
For the menu handle, I removed the overflow: hidden... Not sure if that will cause any issues. I also moved te right label a bit to the left, so it doesn't stick to the link, and removed the top: -1px (not sure why?).
@
10 years ago
Add the non-color-scheme-keyed outer focus box-shadow to the color-scheme-keyed inset box shadow to preserve focus styling for primary buttons.
This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.
10 years ago
#35
@
10 years ago
There are some things that are less than perfect overall, such as the cut off that happens when a container has overflow hidden. However, I am happy with the progress made in 4.0, and those instances all need to be dealt with individually. Nav menus in particular could use some overall thought and not just messing with the glow.
zamfeer and I are working on this at our company summit.