From 50344e3b14c22c886415c0e7d799aca778dc39ab Mon Sep 17 00:00:00 2001 From: Patrick Sullivan Date: Thu, 16 Mar 2023 05:12:38 -0400 Subject: [PATCH] fix(searchbox): add aria-hidden to svg icons (#5547) * fix: add aria-hidden=true to all instances of ais-SearchBox-submitIcon * fix: add aria-hidden=true to all instances of ais-SearchBox-loadingIcon * fix: add aria-hidden=true to all instances of ais-SearchBox-resetIcon * fix: add remaining svg aria-hidden labels to components and IS search-box widget * chore: move aria-hidden attrs to top for a-z order * feat(current-refinements): provide indexId of refinements in transformItems (#5546) * chore: more aria-hidden attrs to top for a-z order --------- Co-authored-by: Dhaya <154633+dhayab@users.noreply.github.com> --- examples/react-hooks/e-commerce/App.tsx | 1 + .../__tests__/__snapshots__/App.test.js.snap | 2 ++ .../__tests__/__snapshots__/App.test.js.snap | 2 ++ .../tests/__snapshots__/index.test.js.snap | 2 ++ .../__tests__/__snapshots__/App.test.js.snap | 2 ++ .../__tests__/__snapshots__/App.test.js.snap | 2 ++ .../src/__snapshots__/App.test.js.snap | 2 ++ .../__tests__/refinement-list.test.tsx | 6 ++++++ .../search-box/__tests__/search-box.test.tsx | 3 +++ .../widgets/search-box/defaultTemplates.tsx | 3 +++ .../src/components/SearchBox.js | 3 +++ .../__tests__/__snapshots__/Menu.js.snap | 6 ++++++ .../__snapshots__/RefinementList.js.snap | 6 ++++++ .../__tests__/__snapshots__/SearchBox.js.snap | 20 +++++++++++++++++++ .../src/ui/SearchBox.tsx | 3 +++ .../src/ui/__tests__/RefinementList.test.tsx | 3 +++ .../src/ui/__tests__/SearchBox.test.tsx | 9 +++++++++ .../widgets/__tests__/RefinementList.test.tsx | 3 +++ .../src/widgets/__tests__/SearchBox.test.tsx | 3 +++ .../src/components/SearchInput.vue | 2 ++ .../__snapshots__/RefinementList.js.snap | 12 +++++++---- .../__tests__/__snapshots__/SearchBox.js.snap | 6 ++++-- specs/src/pages/widgets/menu.md | 6 +++--- specs/src/pages/widgets/refinement-list.md | 6 +++--- specs/src/pages/widgets/search-box.md | 18 ++++++++--------- 25 files changed, 110 insertions(+), 21 deletions(-) diff --git a/examples/react-hooks/e-commerce/App.tsx b/examples/react-hooks/e-commerce/App.tsx index 786524bea7..d88f72faba 100644 --- a/examples/react-hooks/e-commerce/App.tsx +++ b/examples/react-hooks/e-commerce/App.tsx @@ -249,6 +249,7 @@ function SubmitIcon() { width="16" height="16" viewBox="0 0 18 18" + aria-hidden="true" >