Skip to content

Commit

Permalink
Enable tabbing through the department menu on mobile view (#2489)
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav authored Dec 9, 2024
1 parent ed7d438 commit 44497b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/public/src/containers/pages/CatalogPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ export class CatalogPage extends React.Component<Props> {
*/
toggleMobileFilterWindowExpanded = (expanded: boolean) => {
this.setState({ mobileFilterWindowExpanded: expanded })
const inputs = [...document.getElementsByTagName("a")]
inputs.forEach(input =>
input.setAttribute("tabindex", expanded ? "-1" : "0")
)
}

/**
Expand Down Expand Up @@ -772,11 +776,7 @@ export class CatalogPage extends React.Component<Props> {
)
)
return (
<nav
className="sticky-top"
id="department-sidebar"
aria-label="department filters"
>
<nav id="department-sidebar" aria-label="department filters">
<ul id="department-sidebar-link-list">{departmentSideBarListItems}</ul>
</nav>
)
Expand Down

0 comments on commit 44497b8

Please sign in to comment.