Sobes.tech
Middle

Ce elemente din HTML5 pot utiliza atribute ARIA?

sobes.tech AI

Răspuns de la AI

Practically 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. Can be used to define roles of page zones.
  • Interactive elements: button, a, input, select, textarea. Can receive attributes like aria-label, aria-describedby, aria-expanded and others.
  • List elements: ul, ol, li. 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 complement them.
  • Form elements: form, fieldset, legend.
  • Multimedia elements: img, audio, video. 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 follow the principle "Use native elements whenever possible". Excessive or incorrect use of ARIA can impair accessibility.