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

Improve the new tab focus style for Windows High Contrast Mode #46523

Closed
afercia opened this issue Dec 14, 2022 · 0 comments · Fixed by #46647
Closed

Improve the new tab focus style for Windows High Contrast Mode #46523

afercia opened this issue Dec 14, 2022 · 0 comments · Fixed by #46647
Assignees
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] UI Components Impacts or related to the UI component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@afercia
Copy link
Contributor

afercia commented Dec 14, 2022

Description

Follow-up to #46276

Thew new tab focus style moves the box-shadow from the button to a pseudo element so that it's displayed inside the button. So dar so food! It's also similar to the focus style used in the W3C tabs example so it's a well established pattern.

However, the transparent outline used to support Windows High Contrast Mode is still applied on the tab button. In some cases, for example in the settings sidebar, this makes the transparent outline cut-off because some ancestor element uses overflow: auto. In the screenshot below, I made the transparent outline red, to illustrate the problem:

Screenshot 2022-12-14 at 09 02 38

I'd suggest to move the transparent outline to the inner pseudo element, together with the new box-shadow. Worth reminding in Windows High Contrast Mode the CSS box-shadows aren't visible. The outline is.

/Cc @jasmussen

Step-by-step reproduction instructions

  • Use Windows and enable High Contrast Mode .
  • Alternatively, alter the CSS to make the buttons transparent outline red.
  • Edit a post and use the keyboard to navigate to the settings sidebar tabs.
  • Observe the outline is cut-off.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [a11y] Keyboard & Focus CSS Styling Related to editor and front end styles, CSS-specific issues. labels Dec 14, 2022
@jasmussen jasmussen self-assigned this Dec 14, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 19, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 17, 2023
@priethor priethor added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). and removed [a11y] Keyboard & Focus labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] UI Components Impacts or related to the UI component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants