Skip to content

Commit

Permalink
fix: Remove div to make aria menu correct
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Mar 5, 2025
1 parent 46e88a4 commit 87a1d8c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 49 deletions.
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

0 comments on commit 87a1d8c

Please sign in to comment.