Skip to content

Commit d46395b

Browse files
authored
Merge pull request #26904 from github/repo-sync
repo sync
2 parents c377c8a + 46cba8f commit d46395b

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

components/Search.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ export function Search({
218218
<div className="position-relative z-2">
219219
<form role="search" className="width-full d-flex" noValidate onSubmit={onFormSubmit}>
220220
<label className="text-normal width-full">
221-
<span className="visually-hidden">{t`placeholder`}</span>
221+
<span
222+
className="visually-hidden"
223+
aria-label={t`label`}
224+
aria-describedby={t`description`}
225+
>{t`placeholder`}</span>
222226
<input
223227
data-testid="site-search-input"
224228
ref={inputRef}
@@ -237,13 +241,15 @@ export function Search({
237241
)}
238242
type="search"
239243
placeholder={t`placeholder`}
240-
autoComplete="off"
244+
autoComplete={localQuery ? 'on' : 'off'}
241245
autoCorrect="off"
242246
autoCapitalize="off"
243247
spellCheck="false"
244248
maxLength={512}
245249
onChange={onSearch}
246250
value={localQuery}
251+
aria-label={t`label`}
252+
aria-describedby={t`description`}
247253
/>
248254
</label>
249255
<button className="d-none" type="submit" title="Submit the search query." hidden />
@@ -393,7 +399,12 @@ function ShowSearchResults({
393399
You're searching the <strong>{searchVersion}</strong> version.
394400
</p>
395401
<div className="float-right mr-4">
396-
<p className={cx(styles.selectWording, 'f6 d-inline-block')}>Select version:</p>
402+
<p
403+
aria-describedby={`You're searching the ${searchVersion} version`}
404+
className={cx(styles.selectWording, 'f6 d-inline-block')}
405+
>
406+
Select version:
407+
</p>
397408
<DropdownMenu
398409
placeholder={searchVersion}
399410
items={searchVersions}

data/ui.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ release_notes:
3434
banner_text: GitHub began rolling these changes out to enterprises on
3535
search:
3636
need_help: Need help?
37-
placeholder: Search topics, products...
37+
placeholder: Search GitHub Docs
3838
loading: Loading
3939
no_results: No results found
4040
search_results_for: Search results for
4141
no_content: No content
4242
matches_displayed: Matches displayed
4343
search_error: An error occurred trying to perform the search.
44+
description: Enter a search term to find it in the GitHub Documentation.
45+
label: Search GitHub Docs
4446
homepage:
4547
explore_by_product: Explore by product
4648
version_picker: Version

0 commit comments

Comments
 (0)