Repository navigation
Description
Describe the Issue
We are relying on the browser's default keyboard focus indicator for quite a few focusable elements and it just isn't very accessible in certain browsers (looking at you Chrome). We really need to settle on a focus indicator color and then make sure every focusable element uses it for the focus outline. I've been using our CSS custom variable --blue-mid for things I've worked on because it has accessible contrast with both our light and dark themes (you can see this in the main nav menu or the tabs when viewing a step in narrow view).
Affected Page
Steps to Reproduce
Using Chrome (or any chrome-based browser), open the page in wide (desktop) view and start tabbing through the controls. When you get to the five buttons above the editor the focus outline will barely be noticeable on some of them and pretty much non-existent on others. Also notice that we have several different focus outline colors in the header/breadcrumbs. While not technically a WCAG violation I think having a standard color for all of them would be better (not just aesthetically but also for accessibility).
Expected behavior
Perhaps create a custom CSS variable for the focus outline color and then start updating all of our focusable elements to use it. The width of the outline could vary depending on how much space we have and where the element is located, but I would recommend at least a width of 2px.
Even if we won't be able to settle on an official outline color for a while, I still think we should pick a temporary one for now and put it in place so that when we do finally settle on a color it will be relatively easy to make the switch. Also, CSS allows us to only show the focus outline to people using the keyboard to navigate the page, so I'm guessing most of our users won't even see it. Thus, picking a temporary color for now isn't going to affect the aesthetics for most users but will make an immediate impact on accessibility for those who rely on it. I guess I'm asking that we make the accessibility improvements now instead of waiting until we have an official color scheme in place.
Screenshots
No response
System
- Device: Desktop
- OS: Both Linux Fedora 36 and Windows 11
- Browser: Chrome
- Version: 106
Additional context
No response
Activity
ahmaxed commentedon Oct 19, 2022
That makes sense and you cannot go wrong with mid-blue. We can move forward with adding the outlines here and reapply them to the upcoming component library (some already have them).
bbsmooth commentedon Mar 6, 2023
A design question. When we have a button with a border, such as:
Should the keyboard focus outline go around the outside of the border so that the border is still visible:
Or should the keyboard focus outline cover the border:
Or perhaps sometimes we want one and sometimes the other?
P.S. Just want to add that either way is accessible, so it's more a question of aesthetics.
ahmaxed commentedon Mar 15, 2023
I'm gravitating towards covering the border since it would take less space.
So both would work. Regardless of what we do, it should be implemented across.