a11ymatters | Documenting everything through the journey of learning web | User Interface library
kandi X-RAY | a11ymatters Summary
kandi X-RAY | a11ymatters Summary
Documenting everything through the journey of learning web accessibility.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of a11ymatters
a11ymatters Key Features
a11ymatters Examples and Code Snippets
Community Discussions
Trending Discussions on a11ymatters
QUESTION
The current HTML for my search form looks like this:
...ANSWER
Answered 2017-May-09 at 03:02Best practice, arguably, is to use . It provides a larger hit area and offers a visual label that does not go away when the field gets focus (which is what happens in your example).
Since designs sometimes visually hide the label text, there is not much benefit to using a and completely hiding it. In that scenario, using
aria-label
is probably fine in the context of a search form.
aria-labelledby
needs to point to the id
of some text to act as a label, so if you are going to do it in this context then you might as well go back to using .
For your submit button, the alt
attribute is the correct thing to use, but be less verbose.
In your case, you can get away with this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install a11ymatters
Inside the directory, run npm install.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page