Skip to content

Commit

Permalink
Merge pull request #3813 from carbon-design-system/fix-firefox-appswi…
Browse files Browse the repository at this point in the history
…tcher-focus

fix(appswitcher): firefox focus
  • Loading branch information
abpaul1993 authored Jul 10, 2023
2 parents 52d0c89 + bb0689b commit d799de7
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const MultiWorkspaceSuiteHeaderAppSwitcher = ({
selectedWorkspace?.name ?? selectedWorkspace?.id ?? mergedI18n.selectWorkspace;

return (
<ul data-testid={testId} className={baseClassName}>
<ul data-testid={testId} className={baseClassName} tabIndex={tabIndex}>
{!isWorkspacesView ? (
<>
{workspaces?.length > 1 ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const SuiteHeaderAppSwitcher = ({
const tabIndex = isExpanded ? 0 : -1;

return (
<ul data-testid={testId} className={baseClassName}>
<ul data-testid={testId} className={baseClassName} tabIndex={tabIndex}>
<li className={`${baseClassName}--nav-link`}>
{allApplicationsLink ? (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<p>
Select a workspace
Expand Down Expand Up @@ -189,6 +190,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<li
className="bx--side-nav__item bx--side-nav__item--large"
Expand Down Expand Up @@ -458,6 +460,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<p>
Select a workspace
Expand Down Expand Up @@ -632,6 +635,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<li
className="bx--side-nav__item bx--side-nav__item--large"
Expand Down Expand Up @@ -837,6 +841,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -1157,6 +1162,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -1406,6 +1412,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="multi-workspace-suite-header-app-switcher"
tabIndex={-1}
>
<li
className="bx--side-nav__item bx--side-nav__item--large"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -178,6 +179,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Select a workspace
Expand Down Expand Up @@ -1444,6 +1445,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="bx--side-nav__item bx--side-nav__item--large"
Expand Down Expand Up @@ -2285,6 +2287,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -3155,6 +3158,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -4524,6 +4528,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -5491,6 +5496,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -6481,6 +6487,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -7390,6 +7397,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -8780,6 +8788,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -10268,6 +10277,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -11148,6 +11158,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Select a workspace
Expand Down Expand Up @@ -11953,6 +11964,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="bx--side-nav__item bx--side-nav__item--large"
Expand Down Expand Up @@ -12794,6 +12806,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<p>
Workspace
Expand Down Expand Up @@ -13674,6 +13687,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher-multiworkspace"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="bx--side-nav__item bx--side-nav__item--large"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -1878,6 +1879,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -2666,6 +2668,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -3503,6 +3506,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -4264,6 +4268,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -5539,6 +5544,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -6879,6 +6885,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down Expand Up @@ -7611,6 +7618,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/U
<ul
className="iot--suite-header-app-switcher"
data-testid="suite-header-app-switcher"
tabIndex={-1}
>
<li
className="iot--suite-header-app-switcher--nav-link"
Expand Down

0 comments on commit d799de7

Please sign in to comment.