A11Y: makes search results count readable by screen reader (#12437)
This commit is contained in:
parent
033d6b6437
commit
67e1ae3f7d
|
@ -15,6 +15,7 @@ export default TextField.extend({
|
||||||
"maxLength",
|
"maxLength",
|
||||||
"dir",
|
"dir",
|
||||||
"aria-label",
|
"aria-label",
|
||||||
|
"aria-controls",
|
||||||
],
|
],
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
|
|
@ -4,7 +4,14 @@
|
||||||
<div class="search-advanced">
|
<div class="search-advanced">
|
||||||
{{#unless site.mobileView}}
|
{{#unless site.mobileView}}
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
{{search-text-field value=searchTerm class="full-page-search search no-blur search-query" aria-label=(i18n "search.full_page_title") enter=(action "search") hasAutofocus=hasAutofocus}}
|
{{search-text-field
|
||||||
|
value=searchTerm
|
||||||
|
class="full-page-search search no-blur search-query"
|
||||||
|
aria-label=(i18n "search.full_page_title")
|
||||||
|
enter=(action "search")
|
||||||
|
hasAutofocus=hasAutofocus
|
||||||
|
aria-controls="search-result-count"
|
||||||
|
}}
|
||||||
{{d-button action=(action "search") icon="search" class="btn-primary search-cta" ariaLabel="search.search_button" disabled=searchButtonDisabled}}
|
{{d-button action=(action "search") icon="search" class="btn-primary search-cta" ariaLabel="search.search_button" disabled=searchButtonDisabled}}
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -48,7 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-info">
|
<div class="search-info">
|
||||||
<div class="result-count">
|
<div class="result-count" id="search-result-count" aria-live="polite">
|
||||||
{{html-safe resultCountLabel}}
|
{{html-safe resultCountLabel}}
|
||||||
</div>
|
</div>
|
||||||
<div class="sort-by">
|
<div class="sort-by">
|
||||||
|
|
Loading…
Reference in New Issue