mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
A11Y: Add aria-labels to search inputs and search button (#11752)
This commit is contained in:
parent
e6bbe9b5df
commit
e968af6dd4
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<form action="//google.com/search" id="google-search">
|
||||
<input type="text" name="q" value={{searchTerm}}>
|
||||
<input type="text" name="q" aria-label={{i18n "search.search_google"}} value={{searchTerm}}>
|
||||
<input name="as_sitesearch" value={{siteUrl}} type="hidden">
|
||||
<button class="btn btn-primary" type="submit">{{i18n "search.search_google_button"}}</button>
|
||||
</form>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<div class="search-advanced">
|
||||
{{#unless site.mobileView}}
|
||||
<div class="search-bar">
|
||||
{{search-text-field value=searchTerm class="full-page-search search no-blur search-query" enter=(action "search") hasAutofocus=hasAutofocus}}
|
||||
{{d-button action=(action "search") icon="search" class="btn-primary search-cta" disabled=searchButtonDisabled}}
|
||||
{{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}}
|
||||
{{d-button action=(action "search") icon="search" class="btn-primary search-cta" ariaLabel="search.search_button" disabled=searchButtonDisabled}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
@ -193,7 +193,7 @@
|
||||
{{#if site.mobileView}}
|
||||
<div class="search-bar">
|
||||
{{search-text-field value=searchTerm class="full-page-search search no-blur search-query" enter=(action "search") hasAutofocus=hasAutofocus}}
|
||||
{{d-button action=(action "search") icon="search" class="btn-primary search-cta" disabled=searchButtonDisabled}}
|
||||
{{d-button action=(action "search") icon="search" class="btn-primary search-cta" ariaLabel="search.search_button" disabled=searchButtonDisabled}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
@ -23,6 +23,7 @@ createWidget("search-term", {
|
||||
value: attrs.value || "",
|
||||
autocomplete: "discourse",
|
||||
placeholder: attrs.contextEnabled ? "" : I18n.t("search.title"),
|
||||
"aria-label": I18n.t("search.title"),
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -567,7 +567,7 @@ en:
|
||||
other: "You have <strong>%{count}</strong> posts pending."
|
||||
ok: "OK"
|
||||
example_username: "username"
|
||||
reject_reason:
|
||||
reject_reason:
|
||||
title: "Why are you rejecting this user?"
|
||||
send_email: "Send rejection email"
|
||||
|
||||
@ -2108,6 +2108,7 @@ en:
|
||||
or_search_google: "Or try searching with Google instead:"
|
||||
search_google: "Try searching with Google instead:"
|
||||
search_google_button: "Google"
|
||||
search_button: "Search"
|
||||
|
||||
context:
|
||||
user: "Search posts by @%{username}"
|
||||
|
Loading…
Reference in New Issue
Block a user