-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add form field title for a11y #542
Add form field title for a11y #542
Conversation
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="... ```
0168033
to
2e38a39
Compare
cc @yangshun The job is on hold in Circle CI, but I think it will pass because a |
Looks good to me! I wasn't sure whether Regarding CircleCI, it should be fine. All the submitted PRs on this repo have the same behavior. |
Thanks, a11yproject def looks like a good resource! I originally went with a It already has a And adding |
Not a good idea to change the HTML structure as that's an Algolia search field and Algolia will have to access that DOM element to add functionality.
Upon inspection, the ..."aria-labelledby":e.attr("placeholder")?e.attr("id"):null...
Sounds like a bug in pa11y. We would have to dig into their code to find out why (another opportunity for an open source contribution!) |
Motivation
Resolves part of: #462
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Run
pa11y localhost:3000
before and after this change to confirm that the below error was solved.Related PRs
N/A