Skip to content

Commit

Permalink
Merge pull request #50 from rebeccacremona/anchor-nav-keyboard
Browse files Browse the repository at this point in the history
a11y tweak: keyboard focus + in-page anchors
  • Loading branch information
rebeccacremona authored Feb 5, 2024
2 parents cf03422 + b79635c commit 0cba1a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/cap-jurisdictions.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ export default class CapJurisdictions extends LitElement {
if (hash) {
const element = this.shadowRoot.getElementById(hash);
if (element) {
element.tabIndex = -1;
element.scrollIntoView();
element.focus();
}
}
}
Expand Down

0 comments on commit 0cba1a9

Please sign in to comment.