Skip to content

Commit

Permalink
Add comment suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mdperez86 committed Mar 2, 2023
1 parent 74b49c0 commit ef34a9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Significance: minor
Type: dev

Add a11y support for the tree-control
Add a11y support for the Tree component
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ function getAllHeadings(
);
}

const step = {
ArrowDown: 1,
ArrowUp: -1,
};

function getNextFocusableElement(
currentHeading: HTMLDivElement,
code: 'ArrowDown' | 'ArrowUp'
Expand All @@ -67,10 +72,6 @@ function getNextFocusableElement(
return null;
}

const step = {
ArrowDown: 1,
ArrowUp: -1,
};
const heading = headingsNodeList.item(
currentHeadingIndex + ( step[ code ] ?? 0 )
);
Expand Down

0 comments on commit ef34a9b

Please sign in to comment.