mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +03:00
fix: move role to list item to meet ARIA spec (#2228)
This commit is contained in:
parent
f6a70b11b0
commit
b8f7da6b00
|
@ -44,7 +44,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
|||
render() {
|
||||
const { item, withoutChildren } = this.props;
|
||||
return (
|
||||
<MenuItemLi onClick={this.activate} depth={item.depth} data-item-id={item.id}>
|
||||
<MenuItemLi onClick={this.activate} depth={item.depth} data-item-id={item.id} role="menuitem">
|
||||
{item.type === 'operation' ? (
|
||||
<OperationMenuItemContent {...this.props} item={item as OperationModel} />
|
||||
) : (
|
||||
|
|
|
@ -125,7 +125,6 @@ export interface MenuItemLabelType {
|
|||
}
|
||||
|
||||
export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({
|
||||
role: 'menuitem',
|
||||
className: classnames('-depth' + props.depth, {
|
||||
active: props.active,
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue
Block a user