Skip to content

Commit

Permalink
Make content jump on Enter in tabs also happen with space bar is pres…
Browse files Browse the repository at this point in the history
…sed.
  • Loading branch information
zoltan-dulac committed Mar 10, 2023
1 parent d43bf28 commit 8752c9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/modules/es4/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const tabgroup = new function() {
const { target, key } = e;
const role = target.getAttribute("role");

if (role === "tab" && key === "Enter") {
if (role === "tab" && (key === "Enter" || key === " ")) {
const { href } = target;
const splitHref = href.split("#");
if (splitHref.length === 2) {
Expand Down
2 changes: 1 addition & 1 deletion js/modules/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const tabgroup = new function() {
const { target, key } = e;
const role = target.getAttribute("role");

if (role === "tab" && key === "Enter") {
if (role === "tab" && (key === "Enter" || key === " ")) {
const { href } = target;
const splitHref = href.split("#");
if (splitHref.length === 2) {
Expand Down

0 comments on commit 8752c9b

Please sign in to comment.