From 22ec3c90f53cd5a0bf4461b637da2bddaea48d5c Mon Sep 17 00:00:00 2001 From: Mike van Veenhuijzen Date: Mon, 18 Nov 2024 14:52:42 +0100 Subject: [PATCH 1/2] fix(a11y): rowindex and colindex must start from 1 --- .../CardGrid/__snapshots__/CardGrid.test.tsx.snap | 8 ++++---- .../Favorites/__snapshots__/Favorites.test.tsx.snap | 8 ++++---- .../ui-react/src/components/LayoutGrid/LayoutGrid.tsx | 4 ++-- .../src/pages/User/__snapshots__/User.test.tsx.snap | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/ui-react/src/components/CardGrid/__snapshots__/CardGrid.test.tsx.snap b/packages/ui-react/src/components/CardGrid/__snapshots__/CardGrid.test.tsx.snap index 7eb8d1a4d..888929dbd 100644 --- a/packages/ui-react/src/components/CardGrid/__snapshots__/CardGrid.test.tsx.snap +++ b/packages/ui-react/src/components/CardGrid/__snapshots__/CardGrid.test.tsx.snap @@ -9,12 +9,12 @@ exports[` > renders and matches snapshot 1`] = ` role="grid" >
> renders and matches snapshot 1`] = `
> renders and matches snapshot 1`] = `
> renders and matches snapshot 1`] = ` role="grid" >
> renders and matches snapshot 1`] = `
> renders and matches snapshot 1`] = `
({ className, columnCount, data, renderC return (
{Array.from({ length: rowCount }).map((_, rowIndex) => ( -
+
{data.slice(rowIndex * columnCount, rowIndex * columnCount + columnCount).map((item, columnIndex) => (
diff --git a/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap b/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap index aa8fe5729..a7d60dbac 100644 --- a/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap +++ b/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap @@ -416,12 +416,12 @@ exports[`User Component tests > Favorites Page 1`] = ` role="grid" >
Favorites Page 1`] = `
Favorites Page 1`] = `
Date: Mon, 18 Nov 2024 14:54:44 +0100 Subject: [PATCH 2/2] fix(a11y): hero shelf pagination list aria markup --- .../HeroShelf/HeroShelf.module.scss | 4 +- .../HeroShelf/HeroShelfPagination.tsx | 82 ++++++++++--------- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/packages/ui-react/src/components/HeroShelf/HeroShelf.module.scss b/packages/ui-react/src/components/HeroShelf/HeroShelf.module.scss index be328ccd5..dab11c7e7 100644 --- a/packages/ui-react/src/components/HeroShelf/HeroShelf.module.scss +++ b/packages/ui-react/src/components/HeroShelf/HeroShelf.module.scss @@ -285,7 +285,7 @@ $mobile-landscape-height: 100vh; } &:hover { - transform: scale(1.2) translateY(-50%);; + transform: scale(1.2) translateY(-50%); } &:disabled { @@ -361,7 +361,7 @@ $mobile-landscape-height: 100vh; } } - &[aria-hidden="true"] { + &[disabled] { cursor: default; } } diff --git a/packages/ui-react/src/components/HeroShelf/HeroShelfPagination.tsx b/packages/ui-react/src/components/HeroShelf/HeroShelfPagination.tsx index cd2e04575..c27a30e59 100644 --- a/packages/ui-react/src/components/HeroShelf/HeroShelfPagination.tsx +++ b/packages/ui-react/src/components/HeroShelf/HeroShelfPagination.tsx @@ -50,53 +50,55 @@ const HeroShelfPagination = ({ playlist, index: indexIn, direction, nextIndex: n }, [playlist.playlist, placeholderCount]); return ( - + ); };