mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 11:18:24 +02:00
Add form field title for a11y (#542)
* Add input title to improve a11y Resolves pa11y error: ``` • Error: This form field should be labelled in some way. Use the label element (either with a "for" attribute or wrapped around the form field), or "title", "aria-label" or "aria-labelledby" attributes as appropriate. ├── WCAG2AA.Principle1.Guideline1_3.1_3_1.F68 ├── #search_input_react └── <input type="text" id="search_input_react" placeholder="Search" aria-label="Search" class="aa-input" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-labelledby="search_input_react" aria-owns="... ``` * Fix Prettier failure on Circle CI
This commit is contained in:
parent
71317e49ba
commit
80ece69a10
1 changed files with 6 additions and 1 deletions
|
@ -107,7 +107,12 @@ class HeaderNav extends React.Component {
|
|||
// return algolia search bar
|
||||
return (
|
||||
<li className="navSearchWrapper reactNavSearchWrapper" key="search">
|
||||
<input id="search_input_react" type="text" placeholder="Search" />
|
||||
<input
|
||||
id="search_input_react"
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
title="Search"
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
} else if (link.languages) {
|
||||
|
|
Loading…
Add table
Reference in a new issue