Skip to content

Commit

Permalink
fix(home): make tiles and arrows tabable
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut committed May 10, 2021
1 parent 03dcc0d commit 2ab122f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Shelf/Shelf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ const Shelf: React.FC<ShelfProps> = ({
renderLeftControl={(handleClick) => (
<div
className={isInitState ? styles.arrowDisabled : styles.arrow}
role="button"
tabIndex={isInitState ? -1 : 0}
aria-label="Slide left"
onClick={() => {
setIsInitState(false);
handleClick();
Expand All @@ -71,6 +74,9 @@ const Shelf: React.FC<ShelfProps> = ({
renderRightControl={(handleClick) => (
<div
className={styles.arrow}
role="button"
tabIndex={0}
aria-label="Slide right"
onClick={() => {
setIsInitState(false);
handleClick();
Expand Down
1 change: 1 addition & 0 deletions src/components/TileDock/TileDock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ const TileDock = <T extends unknown>({
return (
<li
key={tile.key}
tabIndex={isInView ? 0 : -1}
style={{
width: `${tileWidth}%`,
paddingLeft: spacing / 2,
Expand Down

0 comments on commit 2ab122f

Please sign in to comment.