[MM-61627]: Fix focus order in sidebar (#29743)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
77ab7b92c6
Коммит
57f13549d7
@@ -85,7 +85,7 @@ describe('Verify Accessibility Support in Channel Sidebar Navigation', () => {
|
|||||||
cy.focused().parent().next().find('.SidebarChannel').each((el, i) => {
|
cy.focused().parent().next().find('.SidebarChannel').each((el, i) => {
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
cy.focused().findByText('CHANNELS');
|
cy.focused().findByText('CHANNELS');
|
||||||
cy.focused().tab().tab().tab();
|
cy.focused().tab().tab();
|
||||||
}
|
}
|
||||||
|
|
||||||
// * Verify if focus changes to different channels in Channels section
|
// * 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) => {
|
cy.focused().tab().tab().parent().next().find('.SidebarChannel').each((el, i) => {
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
cy.focused().findByText('FAVORITES');
|
cy.focused().findByText('FAVORITES');
|
||||||
cy.focused().tab().tab().tab();
|
cy.focused().tab().tab();
|
||||||
}
|
}
|
||||||
|
|
||||||
cy.wrap(el).find('.SidebarLink').should('be.focused');
|
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']) => {
|
handleA11yKeyDown = (e: KeyboardEvent<HTMLButtonElement>['nativeEvent']) => {
|
||||||
if (isKeyPressed(e, Constants.KeyCodes.ENTER)) {
|
if (isKeyPressed(e, Constants.KeyCodes.ENTER)) {
|
||||||
|
e.preventDefault();
|
||||||
this.handleCollapse();
|
this.handleCollapse();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export const SidebarCategoryHeader = React.forwardRef((props: Props, ref?: React
|
|||||||
<div
|
<div
|
||||||
className='SidebarChannelGroupHeader_text'
|
className='SidebarChannelGroupHeader_text'
|
||||||
{...dragHandleProps}
|
{...dragHandleProps}
|
||||||
|
tabIndex={-1}
|
||||||
>
|
>
|
||||||
{wrapEmojis(props.displayName)}
|
{wrapEmojis(props.displayName)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user