Yes it's necessary. For readers who are wondering, ARIA means Accessible Rich Internet Applications. Details at w3.org/TR/wai-aria. Assuming the invalid field entry is for a field that has a label, and the label is visible on screen, the aria-labelledby is recommended over aria-label.
- Should icons have aria hidden?
- Why do we need aria-label?
- What is the difference between aria-label and alt text?
- Are icon fonts accessible?
Should icons have aria hidden?
Because icons are almost always purely decorative features, it is wise to completely exclude them from the Accessibility Tree . aria-hidden="true" achieves just that. For this reason it is included in every example of <i> - to make the internet a more accessible place.
Why do we need aria-label?
Description. The purpose of this technique is to provide a label for objects that can be read by assistive technology. The aria-label attribute provides the text label for an object, such as a button. When a screen reader encounters the object, the aria-label text is read so that the user will know what it is.
What is the difference between aria-label and alt text?
The alt attribute is the preferred and most commonly used way to provide a text alternative for img and area elements. The aria-labelledby attribute can be used to provide a text alternative when an image can be described using text already associated with the image, or for elements with role="img" .
Are icon fonts accessible?
Icon fonts are notoriously bad for accessibility and can lead to some frustrating experiences for those who rely on assistive technologies. Treated like text — The browser treats fonts like text because that is what fonts are supposed to be.