Support » Accessibility » Role group attribute for figure tag

  • Hello,

    WCAG recommend to use a “role” attribute with “group” value for “figure” tag. This is for assistive technologies that don’t recognize “figure” tag.
    An “aria-labelledby” on the “figure” tag referring to the id of “figcaption” tag should also be added.

    Could these attributes be added to WordPress?


    <figure role="group" aria-labelledby="fig11">
      <img src="castle-etching.jpg" alt="The castle has one tower, and a tall wall around it.">
      <figcaption id="fig11">Charcoal on  wood. Anonymous, circa 1423.</figcaption>


Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins


    WCLDN 2018 Contributor | Volunteer support

    Hi @crakotte, I think the W3C’s example here is for a group of images specifically. Is that what you’re using in WordPress? The markup should be a nested figure element (within a figure element).


    The W3C’s example is also for images with a legend (figcaption). If you look at the code, you have a “figure” tag around some others “figure” tags. And those others “figure” tags also have the “role” and “aria-labelledby” attributes.

    So, one image with a legend should also have these attributes. In WordPress, we already have the right tags “figure” and “figcaption”. It just lacks a little piece of code 🙂

    If we see here :, “aria-labelledby” is not necessary. So, we need only the “role” attribute (easier!).

    • This reply was modified 1 year, 3 months ago by  crakotte.

    Hi, @crakotte – Thanks for pointing this out! There is an open ticket about these relationships, and I’ve added a link to this thread so that this specific comment is taken into consideration.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Role group attribute for figure tag’ is closed to new replies.