FormField-label used for aria-label
See original GitHub issueWe need to look at defaulting aria-label
as label if one of the following is not provided
aria-describedby
, aria-description
or aria-labeledBy
, aria-label
.
Issue Analytics
- State:
- Created 10 months ago
- Comments:7
Top Results From Across the Web
Labeling Controls | Web Accessibility Initiative (WAI)
The aria-label attribute can also be used to identify form controls. This approach is well supported by screen readers and other assistive technology,...
Read more >ARIA: form role - Accessibility - MDN Web Docs - Mozilla
The <form> element defines a form landmark when it has an accessible name (e.g. aria-labelledby , aria-label or title ).
Read more >Creating Accessible Forms - Advanced Form Labeling
With aria-labelledby , one element can label multiple form controls, and one form control can be labelled by multiple elements. The following ...
Read more >aria-label - examples and best practices - Aditus
The aria-label should be used to provide a text alternative to an element that has no visible text on the screen. See its...
Read more >Form <input> elements should have a visible label
The aria-label attribute allows you to add a label directly to pretty much any HTML element, including form elements, paragraphs, tables, and more....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agree completely with this.
first rule of ARIA is: If you can use a native HTML element [HTML51] or attribute with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.
Good note, if we have
htmlFor
andid
then we don’t need an aria-label. I wonder which direction we should be encouraging,aria-label
orhtmlFor
?Maybe
htmlFor
should be used in most cases andaria-label
should only be used if what the screenreader reads out should be different than the label text