From f530069a4e078a95eba079e8797ae877547ece05 Mon Sep 17 00:00:00 2001 From: Yvonne Tang <42749717+yvonnetangsu@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:35:40 -0700 Subject: [PATCH] ADAPT-5851 | Improve site search a11y (#364) * name browserslistrc properly * Add SR only label to search field; add type="button" to buttons * Add type="button" for all the buttons missing this attribute * a11y patch ups * fixups * Add aria live to number of search results * Pagination improvements * Return focus to open search button after search overlay is closed * Fix for document not available during SSR * Add underline on highlighted suggested search; use ul for search results structure * Remove redundant role=navigation on pagination --- .browserlistrc => .browserslistrc | 0 src/components/composite/accordion.js | 2 ++ src/components/composite/accordionItem.js | 1 + src/components/composite/modal.js | 1 + .../composite/oodGallerySlideshow.js | 17 +++++++--- src/components/composite/oodQuoteSlider.js | 4 +-- .../navigation/contentMenu/oodContentMenu.js | 1 + .../navigation/megaMenu/oodMegaMenu.js | 1 + .../navigation/megaMenu/oodMegaMenuSection.js | 1 + src/components/search/autocomplete.js | 27 +++++++++++++--- src/components/search/hits.js | 29 +++++++++-------- src/components/search/pagination.js | 17 +++++----- src/components/search/searchOverlay.js | 31 +++++++++++++++++-- src/components/search/searchResults.js | 3 ++ src/components/search/stats.js | 5 +-- src/scss/components/search/_input.scss | 1 + 16 files changed, 105 insertions(+), 36 deletions(-) rename .browserlistrc => .browserslistrc (100%) diff --git a/.browserlistrc b/.browserslistrc similarity index 100% rename from .browserlistrc rename to .browserslistrc diff --git a/src/components/composite/accordion.js b/src/components/composite/accordion.js index 20a0e259..78d5a607 100644 --- a/src/components/composite/accordion.js +++ b/src/components/composite/accordion.js @@ -87,12 +87,14 @@ class Accordion extends React.Component { {props.blok.accordionItems.length > 1 && ( <> @@ -75,7 +80,11 @@ const oodGallerySlideshow = ({ blok }) => { {dots} - @@ -109,13 +118,13 @@ const oodGallerySlideshow = ({ blok }) => { const modalSliderSettings = { nextArrow: ( - ), prevArrow: ( - diff --git a/src/components/composite/oodQuoteSlider.js b/src/components/composite/oodQuoteSlider.js index f6549e14..17db91c4 100644 --- a/src/components/composite/oodQuoteSlider.js +++ b/src/components/composite/oodQuoteSlider.js @@ -11,7 +11,7 @@ const OodQuoteSlider = ({ blok }) => { const sliderSettings = { nextArrow: ( - ), prevArrow: ( -