diff --git a/_parcel/behaviors/search-form.js b/_parcel/behaviors/search-form.js index 2cf243516..d89a9e6d5 100644 --- a/_parcel/behaviors/search-form.js +++ b/_parcel/behaviors/search-form.js @@ -9,7 +9,7 @@ onmount('[data-js-search-form]', function () { on(this, 'submit', (e) => { e.preventDefault() - const link = document.querySelector('a[data-search-index]:visible') + const link = document.querySelector('a[data-search-index]:not([hidden])') const href = link && link.getAttribute('href') if (href) window.location = href diff --git a/_parcel/helpers/search.js b/_parcel/helpers/search.js index db6548664..65036a269 100644 --- a/_parcel/helpers/search.js +++ b/_parcel/helpers/search.js @@ -10,7 +10,8 @@ import qsa from 'dom101/query-selector-all' export function showAll() { qsa('[data-search-index]').forEach((el) => { - el.removeAttribute('aria-hidden') + el.removeAttribute('hidden') + el.style.removeProperty('display') }) } @@ -31,10 +32,12 @@ export function show(val) { .join('') qsa('[data-search-index]').forEach((el) => { - el.setAttribute('aria-hidden', true) + el.setAttribute('hidden', true) + el.style.setProperty('display', "none") }) qsa(selectors).forEach((el) => { - el.removeAttribute('aria-hidden') + el.removeAttribute('hidden') + el.style.removeProperty('display') }) } diff --git a/_sass/2017/base/base.scss b/_sass/2017/base/base.scss index 60f80b5d4..58926a456 100644 --- a/_sass/2017/base/base.scss +++ b/_sass/2017/base/base.scss @@ -55,11 +55,6 @@ a:hover { color: $base-b3; } -/* prism.js adds area-hidden which it probably shouldn't */ -[aria-hidden]:not(.line-highlight) { - display: none !important; -} - // No tooltips on mobile @media (max-width: 580px) { .hint--bottom {