mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #33317 from overleaf/mj-menu-bar-role
[web] Fix aria roles for nested menu bar dropdowns GitOrigin-RevId: 1c285c2ef8ed0c589bd6b0df6112c054c8662ca4
This commit is contained in:
committed by
Copybot
parent
823f11426b
commit
42f7bca37e
@@ -91,6 +91,8 @@ const NestedDropdownToggle: FC<React.PropsWithChildren> = forwardRef<
|
||||
'nested-dropdown-toggle',
|
||||
'dropdown-item'
|
||||
)}
|
||||
role="menuitem"
|
||||
aria-haspopup
|
||||
>
|
||||
{children}
|
||||
<MaterialIcon type="chevron_right" />
|
||||
@@ -122,6 +124,8 @@ export const NestedMenuBarDropdown: FC<
|
||||
show={active}
|
||||
autoClose
|
||||
onToggle={onToggle}
|
||||
as="li"
|
||||
role="none"
|
||||
>
|
||||
<DropdownToggle
|
||||
id={`${menuId}-${id}`}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ElementType, ReactNode, PropsWithChildren } from 'react'
|
||||
import type { ElementType, ReactNode, PropsWithChildren, AriaRole } from 'react'
|
||||
import type { ButtonProps } from '@/shared/components/types/button-props'
|
||||
import type { DropdownMenuProps as BS5DropdownMenuProps } from 'react-bootstrap'
|
||||
|
||||
@@ -26,6 +26,7 @@ export type DropdownProps = {
|
||||
drop?: 'up' | 'up-centered' | 'start' | 'end' | 'down' | 'down-centered'
|
||||
focusFirstItemOnShow?: false | true | 'keyboard'
|
||||
onKeyDown?: (event: React.KeyboardEvent) => void
|
||||
role?: AriaRole
|
||||
}
|
||||
|
||||
export type DropdownItemProps = PropsWithChildren<{
|
||||
|
||||
Reference in New Issue
Block a user