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
Convert the toolbar in Widgets screen to ARIA toolbar #25111
Conversation
showInserterHelpPanel | ||
toggleProps={ { | ||
...inserterToggleProps, | ||
...toolbarItemProps, |
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.
This also includes ref
, which will pass to the toggle button in <Inserter>
.edit-widgets-header-toolbar { | ||
display: inline-flex; | ||
align-items: center; | ||
border: none; | ||
// The Toolbar component adds different styles to buttons, so we reset them | ||
// here to the original button styles | ||
> .components-button.has-icon, | ||
> .components-dropdown > .components-button.has-icon { | ||
height: $button-size; | ||
min-width: $button-size; | ||
padding: 6px; | ||
&.is-pressed { | ||
background: $gray-900; | ||
} | ||
&:focus:not(:disabled) { | ||
box-shadow: | ||
0 0 0 $border-width-focus var(--wp-admin-theme-color), | ||
inset 0 0 0 $border-width $white; | ||
outline: 1px solid transparent; | ||
} | ||
&::before { | ||
display: none; | ||
} | ||
} | ||
} |
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.
These are mostly copied from edit-post/header-toolbar
Size Change: +322 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
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.
Mostly looks good, just a couple comments below!
I noticed while testing that the Undo/Redo buttons aren't working correctly, but it's not related to this changeset as they're broken on the main branch too 🤔
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.
Looks good!
5588637
to 6cc9a6a
Compare
Description
Fix #24938.
Convert the toolbar in Widgets screen from menu to toolbar, and make them accessible.
How has this been tested?
Screenshots
Types of changes
Bug fix
Checklist: