Semantics
A container for a collection of elements that form an image.
Additional info from the ARIA specification
See synonym img.
An img can contain captions and descriptive text, as well as multiple image files that when viewed together give the impression of a single image. An img represents a single graphic within a document, whether or not it is formed by a collection of drawing objects. In order for an element with a role of img to be perceivable, authors MUST provide the element with an accessible name. This can be done using the aria-label or aria-labelledby attribute.
Abstract Role
StructureRepresents a non-interactive part of a page that organizes content into coherent units.
Content Categories
Phrasing ContentAn element that typically appears inline and provides semantic meaning to text content.
Allowed Descendants
Phrasing Children Allowed
No interactive content descendants allowed.
Usage
Allowed HTML elements
Implicit semantics
These elements have the role semantics by default, without needing to set the role attribute. Reach for elements with native semantics first when choosing how to implement a role in your content.
img
Explicitly allowed
embed[role=img]iframe[role=img]object[role=img]svg[role=img]
Elements that can have any role
abbr[role=img]address[role=img]b[role=img]blockquote[role=img]canvas[role=img]cite[role=img]code[role=img]custom-element[role=img]data[role=img]del[role=img]dfn[role=img]div[role=img]em[role=img]figure[role=img]i[role=img]ins[role=img]kbd[role=img]mark[role=img]output[role=img]p[role=img]pre[role=img]q[role=img]samp[role=img]small[role=img]span[role=img]table[role=img]tbody[role=img]tfoot[role=img]thead[role=img]time[role=img]u[role=img]var[role=img]