-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tabs focus: Followup for Windows high contrast. #46647
Conversation
Size Change: +192 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
cc: @afercia I am a Windows user and I have actually tested this PR.
I have tried to build a Storybook with this PR and I think it contains one problem. a42b69b1b3ddc2976c9b1df384923f5a.mp4In trunk, the outline is enabled, so users can see which tabs are activated: d3693753e8668ad6bfa04fd32a548621.mp4If it is in the sidebar of a block editor, it can be somehow understood by the change in underlining: If there is a problem from an accessibility standpoint, I think it might be better to explore a more approach. |
I am wondering if it would be possible to implement something like the W3C tabs example, whereby the high contrast mode would make it visible which tabs were clicked or which tabs were still active even if they were out of focus. 3e6db70fa38be43a6cb3f478bea3c60a.mp4 |
@t-hamano you're right, thank you! I think that's because the 'active' style is actually the background color of a CSS pseudo element. Background colors are removed in High Contrast Mode. I think this could be quickly solved by using a border instead of height + background on the |
Thank you for the feedback, let me take a stab when I get a moment 🙏 |
563cb52
to
a065836
Compare
@jasmussen Editor: pr_editor.mp4Storybook: pr_storybook.mp4 |
Can we land this? Thanks again for reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in contacting you.
I didn't know that I could assign myself as a reviewer until now 😅
I have rebased this branch with the latest trunk in local and it appears to be working as expected as well as ever.
Thank you! And of course I'm happy to address any followups. |
What?
Fixes #46523, adds a transparent focus outline to Windows high contrast mode.
In that mode, box shadows are removed, but borders and outlines, even transparent ones, are made fully opaque. By setting a transparent outline, it will show up in Windows set to high contrast mode. This here emulates that by showing the outline red instead of transparent:
Testing Instructions
Test Windows 10 or 11 in high contrast mode, and tab through the tabs.