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

ARIA: Fix invalid DropdownMenu children structure #69441

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,13 @@ function VariationsDropdown( {
toggleProps={ { iconPosition: 'right' } }
>
{ () => (
<div className={ `${ className }__container` }>
<MenuGroup>
<MenuItemsChoice
choices={ selectOptions }
value={ selectedValue }
onSelect={ onSelectVariation }
/>
</MenuGroup>
</div>
<MenuGroup className={ `${ className }__container` }>
<MenuItemsChoice
choices={ selectOptions }
value={ selectedValue }
onSelect={ onSelectVariation }
/>
</MenuGroup>
) }
</DropdownMenu>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,47 +45,45 @@ export default function ScreenNavigationMoreMenu( props ) {
popoverProps={ POPOVER_PROPS }
>
{ ( { onClose } ) => (
<div>
<MenuGroup>
<MenuItem
onClick={ () => {
openRenameModal();
// Close the dropdown after opening the modal.
onClose();
} }
>
{ __( 'Rename' ) }
</MenuItem>
<MenuItem
onClick={ () => {
history.navigate(
`/wp_navigation/${ menuId }?canvas=edit`
);
} }
>
{ __( 'Edit' ) }
</MenuItem>
<MenuItem
onClick={ () => {
onDuplicate();
onClose();
} }
>
{ __( 'Duplicate' ) }
</MenuItem>
<MenuItem
isDestructive
onClick={ () => {
openDeleteConfirmDialog();
<MenuGroup>
<MenuItem
onClick={ () => {
openRenameModal();
// Close the dropdown after opening the modal.
onClose();
} }
>
{ __( 'Rename' ) }
</MenuItem>
<MenuItem
onClick={ () => {
history.navigate(
`/wp_navigation/${ menuId }?canvas=edit`
);
} }
>
{ __( 'Edit' ) }
</MenuItem>
<MenuItem
onClick={ () => {
onDuplicate();
onClose();
} }
>
{ __( 'Duplicate' ) }
</MenuItem>
<MenuItem
isDestructive
onClick={ () => {
openDeleteConfirmDialog();

// Close the dropdown after opening the modal.
onClose();
} }
>
{ __( 'Delete' ) }
</MenuItem>
</MenuGroup>
</div>
// Close the dropdown after opening the modal.
onClose();
} }
>
{ __( 'Delete' ) }
</MenuItem>
</MenuGroup>
) }
</DropdownMenu>
{ deleteConfirmDialogOpen && (
Expand Down
Loading