A11y requires that we have affordances for what is in focus but it does not mandate that we use the browser default focus style.
In many instances the browser default clashes with seven theme and toolbar in ways that are obtrusive and incongruous and in some cases actually impede usability.
One example: Button toolbar handle

Something like this would be better:

Here's the CSS that I altered in inspector to get that.
button.toolbar-icon.toolbar-handle:focus {
outline: none;
border-bottom: 2px solid #66AAFF;
background: #f5f5f5;
}Vertical tabs and fieldsets are also a problem. I will follow up with images of those.
| Comment | File | Size | Author |
|---|---|---|---|
| #32 | toolbar-focus_all_items-2295761-32.patch | 2.92 KB | herom |
| #32 | interdiff-2295761-28-32.txt | 1.02 KB | herom |
| #32 | toolbar-focus-rtl-after.png | 19.93 KB | herom |
| #32 | toolbar-focus-rtl-before-annotated.png | 38.97 KB | herom |
| #29 | 2295761-28-focus-top.png | 26.16 KB | kirkkala |
Comments
Comment #1
tkoleary commentedComment #2
sqndr commentedComment #3
tkoleary commentedComment #4
tkoleary commentedComment #5
tkoleary commentedComment #6
tkoleary commentedComment #7
tkoleary commentedComment #8
tkoleary commented@sqndr thx!
Comment #9
mgiffordThat can add a really nice effect for sure.
Comment #10
sqndr commented@tkoleary: I wanted to add the code as a code block but I was a little fast ;) Looks like a nice improvement!
Comment #11
sqndr commentedEven the Insert Image modal gets this outline (using Chrome, Mac)
Comment #12
lewisnymanComment #13
lewisnymanI like this issue, I would rather we didn't use the bright blue border at the bottom though, only because it looks a bit weird when that section is expanded and we have used that elsewhere as a visual indicator for active elements.
Comment #14
tkoleary commented@LewisNyman
Good point. Do you think the background color is enough?
Comment #15
lewisnyman@tkoleary I would be happy with that, as long as @mgifford is also happy.
Comment #16
mgiffordThat should be just fine. Thanks @LewisNyman - looking forward to seeing the patch.
Comment #17
emma.mariaComment #18
emma.mariaI have added the background colour solution for the button focus styles and they now look lovely.
See screenshots below.
Collapsed with button in focus.

Open with button in focus.

Will there still be follow up of fixes for fieldsets and vertical tabs as mentioned in the issue summary? Otherwise I have completed all the work needed so far.
Comment #19
lewisnymanThis comment is a little vague, because this is the Seven theme.
We probably don't need the button element in the selector
Once too many spaces here
Finally, this seems like the kind of styling that should be the same across themes, different behaviour on Seven vs Bartik would be strange. Moving this into the toolbar module. I think toolbar.theme.css is the correct file.
Comment #20
emma.mariaI have moved the code to toolbar.icons.css where the styles for the toolbar icons live. The comment is gone as a result plus I replicated the selector used (.toolbar .toolbar-icon.toolbar-handle) and placed the focus styles underneath them to make sure it is targeted properly.
Updated screenshot with dev tools debugging...

Comment #21
emma.mariaComment #22
mgiffordThat looks like it will work fine...
Comment #23
alexpottI think we should tackle all the focus issues with toolbar in one patch so it is consistent.
Comment #24
lewisnymanThanks Alex, this needs an issue summary update to show all the focus problems we are fixing.
Comment #25
kirkkalaHere are 2 examples (with patches) for only toolbar icon focus styles as suggested in the ticket.
Comment #26
kirkkalaRevised a bit and paid attention to the toolbar link focuses as well when tabbing through elements.
Patch adds nicer focus effect and indents the subitems keeping the element full width for nicer focus underlining.
Comment #27
Balneum commentedThe elements underlining focus border should be on the left side of the element and the highlighting color (grey) should be the same darkness in both cases (when the element and the sub-category arrow is highlighted). The focus border should work with the same logic with both navigations (top navigation and side navigation).
Comment #28
kirkkala#27 makes sense, moved highlighting border to left of element for both top & side menu, added darker background on focus. Focus is more subtle now.
Comment #29
kirkkalaScreenshots to #28 for keeping track what the patch does.





Comment #30
tkoleary commented@kirkkala Nicely done. I think that ties in really well with other seven styles.
Comment #31
lewisnymanI'm happy with these changes and the code looks good.
Good work!
Comment #32
herom commentedI noticed two issues on the RTL version:
This is with the fixed RTL:
Comment #33
lauriiiTested this manually and it seems to work. We have screenshots also attached here so this should be ready.
Comment #34
webchickDang, that looks MUCH better.
Committed and pushed to 8.x. Thanks!
Comment #36
tkoleary commented@webchick Thank you. I am crying tears of joy. :)