mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-25 01:53:44 +03:00
Mis-nesting of aria roles on sidebar navigation (#2050)
This commit is contained in:
parent
01ffff7f15
commit
7ca10daf12
|
@ -45,7 +45,7 @@ describe('Search', () => {
|
|||
|
||||
getSearchInput().type('{enter}', { force: true });
|
||||
|
||||
cy.contains('[role=navigation] [role=menuitem]', 'Introduction').should('have.class', 'active');
|
||||
cy.contains('[role=menu] [role=menuitem]', 'Introduction').should('have.class', 'active');
|
||||
});
|
||||
|
||||
it('should mark search results', () => {
|
||||
|
|
|
@ -26,7 +26,7 @@ export class MenuItems extends React.Component<MenuItemsProps> {
|
|||
className={className}
|
||||
style={this.props.style}
|
||||
expanded={expanded}
|
||||
{...(root ? { role: 'navigation' } : {})}
|
||||
{...(root ? { role: 'menu' } : {})}
|
||||
>
|
||||
{items.map((item, idx) => (
|
||||
<MenuItem key={idx} item={item} onActivate={this.props.onActivate} />
|
||||
|
|
Loading…
Reference in New Issue
Block a user