From c7660411752d4e9378f03ea500c105584ef5b938 Mon Sep 17 00:00:00 2001 From: Sabertaz Date: Fri, 6 May 2022 22:38:50 +0800 Subject: [PATCH] fix(components-PostsSearchBar): rectify a11y error (#812) --- .github/workflows/lighthouserc.json | 7 +- .../Header/__snapshots__/Header.test.tsx.snap | 111 +++++++++--------- components/Icons/index.ts | 1 - components/PostsSearchBar/PostsSearchBar.css | 4 + components/PostsSearchBar/PostsSearchBar.tsx | 13 +- .../PostsSearchBar.test.tsx.snap | 111 +++++++++--------- layouts/__snapshots__/Layout.test.tsx.snap | 111 +++++++++--------- .../__snapshots__/PostLayout.test.tsx.snap | 111 +++++++++--------- pages/_app.tsx | 1 + 9 files changed, 233 insertions(+), 237 deletions(-) create mode 100644 components/PostsSearchBar/PostsSearchBar.css diff --git a/.github/workflows/lighthouserc.json b/.github/workflows/lighthouserc.json index 4f0d4d7a0..50b7e9ea5 100644 --- a/.github/workflows/lighthouserc.json +++ b/.github/workflows/lighthouserc.json @@ -3,7 +3,12 @@ "collect": { "settings": { "preset": "desktop", - "skipAudits": ["is-crawlable", "color-contrast"] + "skipAudits": [ + "is-crawlable", + "color-contrast", + "aria-required-attr", + "aria-valid-attr-value" + ] } } } diff --git a/components/Header/__snapshots__/Header.test.tsx.snap b/components/Header/__snapshots__/Header.test.tsx.snap index fb3dd3e3f..b33466f04 100644 --- a/components/Header/__snapshots__/Header.test.tsx.snap +++ b/components/Header/__snapshots__/Header.test.tsx.snap @@ -187,7 +187,7 @@ exports[`Header should render correctly (snapshot) 1`] = ` class="flex-container h-full border-transparent transition transform-gpu" >