From 09646191cdc5c5efacabe41d2052ffa817e1c31d Mon Sep 17 00:00:00 2001 From: Tymur Biedukhin Date: Tue, 25 Aug 2020 13:03:11 +0300 Subject: [PATCH] fix(storefront): BCTHEME-159 IDs used in ARIA and labels are not unique --- CHANGELOG.md | 1 + assets/js/theme/global/quick-search.js | 2 +- templates/components/common/navigation-menu.html | 2 +- templates/components/common/navigation.html | 2 +- templates/components/common/quick-search.html | 11 +++++++++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8586c4735..33a59c27a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Fixed IDs used in ARIA and labels which are not unique. [#1791](https://github.com/bigcommerce/cornerstone/pull/1791) ## 4.9.0 (08-05-2020) diff --git a/assets/js/theme/global/quick-search.js b/assets/js/theme/global/quick-search.js index 08b94c7544..fbca98bc40 100644 --- a/assets/js/theme/global/quick-search.js +++ b/assets/js/theme/global/quick-search.js @@ -6,7 +6,7 @@ export default function () { const TOP_STYLING = 'top: 49px;'; const $quickSearchResults = $('.quickSearchResults'); const $quickSearchDiv = $('#quickSearch'); - const $searchQuery = $('#search_query'); + const $searchQuery = $('[data-search-quick]'); const stencilDropDownExtendables = { hide: () => { $searchQuery.trigger('blur'); diff --git a/templates/components/common/navigation-menu.html b/templates/components/common/navigation-menu.html index 08455e8a5a..e725f0651e 100644 --- a/templates/components/common/navigation-menu.html +++ b/templates/components/common/navigation-menu.html @@ -1,6 +1,6 @@ diff --git a/templates/components/common/quick-search.html b/templates/components/common/quick-search.html index ac3e463660..63c4369454 100644 --- a/templates/components/common/quick-search.html +++ b/templates/components/common/quick-search.html @@ -2,8 +2,15 @@
- - + +