a11yTips

13. Accessible Form Labels

Mar 16 2020

It is important for accessibility to have the label tag with every input tag but there are use-cases where you have the UX - input without any label.

Such as the search field (just with placeholder). This will fail accessibility. If you ll ask your UX person to re-design the UX there would be a push back. Then how you are going to fix this issue?

Twitter search field with search keyword as placeholder

Add ARIA-label for the assistive technologies. ARIA-label is the way to tell the assistive technologies that though there is no label tag but this field has this lable tag.

Code sample of input when added ARIA-label

Happy Learning!!

Go to Next Article