mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
[MM-61627]: Fix focus order in sidebar (#29743)
This commit is contained in:
parent
77ab7b92c6
commit
57f13549d7
3 changed files with 4 additions and 2 deletions
|
|
@ -85,7 +85,7 @@ describe('Verify Accessibility Support in Channel Sidebar Navigation', () => {
|
|||
cy.focused().parent().next().find('.SidebarChannel').each((el, i) => {
|
||||
if (i === 0) {
|
||||
cy.focused().findByText('CHANNELS');
|
||||
cy.focused().tab().tab().tab();
|
||||
cy.focused().tab().tab();
|
||||
}
|
||||
|
||||
// * Verify if focus changes to different channels in Channels section
|
||||
|
|
@ -120,7 +120,7 @@ describe('Verify Accessibility Support in Channel Sidebar Navigation', () => {
|
|||
cy.focused().tab().tab().parent().next().find('.SidebarChannel').each((el, i) => {
|
||||
if (i === 0) {
|
||||
cy.focused().findByText('FAVORITES');
|
||||
cy.focused().tab().tab().tab();
|
||||
cy.focused().tab().tab();
|
||||
}
|
||||
|
||||
cy.wrap(el).find('.SidebarLink').should('be.focused');
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
|||
|
||||
handleA11yKeyDown = (e: KeyboardEvent<HTMLButtonElement>['nativeEvent']) => {
|
||||
if (isKeyPressed(e, Constants.KeyCodes.ENTER)) {
|
||||
e.preventDefault();
|
||||
this.handleCollapse();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ export const SidebarCategoryHeader = React.forwardRef((props: Props, ref?: React
|
|||
<div
|
||||
className='SidebarChannelGroupHeader_text'
|
||||
{...dragHandleProps}
|
||||
tabIndex={-1}
|
||||
>
|
||||
{wrapEmojis(props.displayName)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue