Sobes.tech
Middle

Which HTML5 elements can use ARIA attributes?

sobes.tech AI

Answer from AI

Almost all standard HTML5 elements can use ARIA attributes to improve accessibility for users of assistive technologies.

Some examples:

  • Semantic structure elements: header, footer, nav, main, aside, article, section. They can be used to define role zones of a page.
  • Interactive elements: button, a, input, select, textarea. They can receive attributes like aria-label, aria-describedby, aria-expanded, and others.
  • List elements: ul, ol, li. They can use aria-setsize, aria-posinset.
  • Table elements: table, tr, th, td. Although HTML5 has its own attributes for table accessibility (scope, headers), ARIA can supplement them.
  • Form elements: form, fieldset, legend.
  • Multimedia elements: img, audio, video. They can receive descriptive attributes (aria-label).

There are exceptions, for example:

  • Elements that are initially hidden or decorative (script, style, meta, link).
  • Elements that are not displayed in the DOM or are not accessible for interaction.

It is important to use ARIA only when native HTML attributes are insufficient, and to follow the principle "Use native elements whenever possible". Excessive or incorrect use of ARIA can impair accessibility.

Which HTML5 elements can use ARIA attributes… - sobes.tech