If you are using non-text content in your Applications, Websites,… it is essential to provide text alternatives for this content. What are examples for non-text content:
- Icon Buttons
There are some reasons where it is not necessary to provide text alternatives:
- Content is just decorative
- Other alternatives are provided (for example another option to solve a captcha)
Examples to do it
To provide alternatives for images you should use the alt attribute whenever possible. The use of aria-hidden should be done for other elements than html img.
In Angular you can add attributes conditionally. In addition you can find an accessibility description for nearly all Material components to improve your accessibility. Therefore you can find there descriptions for non text-contents, like mat-icon buttons.