-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
a11y: Apply focus style to revision items #57039
Conversation
Size Change: +15 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
@@ -13,8 +13,6 @@ | |||
|
|||
.edit-site-global-styles-screen-revisions__revision-item { | |||
position: relative; | |||
padding-left: $grid-unit-20; | |||
overflow: hidden; |
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.
I had to turn off overflow:hidden
in order to display the focus outline correctly. From what I've tested, there doesn't seem to be any problem with removing this style, but if you have any problems please let me know.
z-index: 1; | ||
position: relative; |
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.
Flaky tests detected in 7758fdf. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7204277667
|
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.
Tested in Firefox, Safari, Chrome and Edge
2023-12-14.20.23.12.mp4
LGTM
Thanks for picking that up 🚀
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.
Nice change, thank you!
Thanks for the review, @ramonjd, @jameskoster! |
What?
This PR applies a focus style to revision items in the Global Style Revisions panel.
Why?
I've noticed that users using only the keyboard can't know which revision they're switching to because revision items don't have a focus style.
How?
I removed the style that canceled out the focus style of the button element, and at the same time adjusted the padding so that the focus outline was displayed correctly.
I also added transparent outlines and borders to help users distinguish between revisions even in Windows' high contrast mode. This approach can be seen by searching the Gutenberg project for the keyword
Windows High Contrast mode.
.Testing Instructions for Mouse
Testing Instructions for Keyboard
tab
key orshift+tab
on your keyboard.Screenshots or screencast
c1dc79c0d0be074bdd42c71536192063.mp4
Widows High Contrast Mode
You should be able to see the revision status just as you would if you were not in high contrast mode.
9933b3fae6085c5c71c8ed6d3cd808b6.mp4