Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus-visible styles are often unclear, inconsistent, or match mouse hover styles #6082

Open
microbit-robert opened this issue Feb 7, 2025 · 1 comment

Comments

@microbit-robert
Copy link
Contributor

Describe the bug
Focus-visible styles are often unclear, inconsistent, or match mouse hover styles. We are hoping to start a discussion on the best way to improve this situation going forward. Our initial feeling is that an outline or border of sufficient thickness and colour contrast (and perhaps offset where necessary) as a separate focus-visible style applied consistently across the app would be a suitable approach. Here are a couple of examples of where this has already been applied and works well:

Image

Image

Some problematic areas, or areas of inconsistency are noted below.

The download button and other buttons in the editor tools section have subtle focus-visible styles that match mouse hover styles. It is quite easy to visually lose where focus is while navigating the page using the keyboard:

Image

The "Show data" button in the simulator is very prominent. It has no focus-visible style, but already has a thick border, so it's less clear what approach should be taken here:

Image

Buttons in the "Version History" area use the react-common button component. The focus-visible outlines are quite thin compared with other examples and the outline position is inconsistent:

Image
Image

If we were to apply such changes, in some cases it's not clear what colours should be used for a focus-visible outline (i.e., brand blue or brand purple).

Do you consider one of the styles in the screenshots added above to be the 'correct' one? We would welcome your thoughts on the above and whether you think the proposed approach is sensible. Please let us know if you have any concerns or alternative options for consideration.

micro:bit version (please complete the following information):
Not hardware related

Desktop (please complete the following information):
Impacts all OS and browsers
Screen shots taken on Windows 11, Chrome version 133.0.6943.60

Additional context
N/A

@microbit-matt-hillsdon @kmcnaught

@Jaqster
Copy link
Member

Jaqster commented Feb 12, 2025

@microbit-robert - go ahead and propose something that feels consistent. Thanks so much for all your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants