Can aria attributes be used instead of an alt attribute to label non-text content?

19 Dec 2017

  • Tweet this item
  • share this item on Linkedin

Accessible Rich Internet Applications (ARIA) can be used to make your website more accessible for people with disabilities such as hearing or visual impairment. The ARIA attributes can be added to markup, especially HTML.

WCAG 2.0 states in 1.1.1 Non-text Content that a text alternative should be provided for non-text content, such as an image, so that assistive technologies such as screen readers can inform the user what the image portrays. An alt attribute should always be used to provide a text alternative for an img element in HTML. An aria attribute can be used as an additional text alternative, but doesn't replace the requirement for an alt attribute.

An alt attribute if set to an empty string would just indicate that the image is not a key part of the content, and therefore non-visual browsers do not have to render it. A non-empty alt text value indicates the image is a key part of the content and provides a text alternative. Either way, the alt attribute must be set for images.