diff --git a/cypress/e2e/invite/invite-dialog.spec.ts b/cypress/e2e/invite/invite-dialog.spec.ts index dedea1fd2b..1553215ac0 100644 --- a/cypress/e2e/invite/invite-dialog.spec.ts +++ b/cypress/e2e/invite/invite-dialog.spec.ts @@ -47,9 +47,11 @@ describe("Invite dialog", function () { // Open the room info panel cy.findByRole("button", { name: "Room info" }).click(); - // Click "People" button on the panel - // Regex pattern due to the string of "mx_BaseCard_Button_sublabel" - cy.findByRole("button", { name: /People/ }).click(); + cy.get(".mx_RightPanel").within(() => { + // Click "People" button on the panel + // Regex pattern due to the string of "mx_BaseCard_Button_sublabel" + cy.findByRole("button", { name: /People/ }).click(); + }); cy.get(".mx_BaseCard_header").within(() => { // Click "Invite to this room" button diff --git a/src/components/views/rooms/RoomSublist.tsx b/src/components/views/rooms/RoomSublist.tsx index ccb3c77f8e..d6d59287a4 100644 --- a/src/components/views/rooms/RoomSublist.tsx +++ b/src/components/views/rooms/RoomSublist.tsx @@ -700,6 +700,10 @@ export default class RoomSublist extends React.Component { onKeyDown={this.onHeaderKeyDown} onFocus={onFocus} aria-label={this.props.label} + role="treeitem" + aria-expanded={this.state.isExpanded} + aria-level={1} + aria-selected="false" >
@@ -708,9 +712,7 @@ export default class RoomSublist extends React.Component { inputRef={ref} tabIndex={tabIndex} className="mx_RoomSublist_headerText" - role="treeitem" aria-expanded={this.state.isExpanded} - aria-level={1} onClick={this.onHeaderClick} onContextMenu={this.onContextMenu} title={this.props.isMinimized ? this.props.label : undefined}