Excess use of article HTML-tag for media

Created on 21 March 2024, about 1 year ago
Updated 19 April 2024, 12 months ago

Problem/Motivation

Claro-theme always renders media image to an html-tag article even if the image has meaning only as part of other content. This is also done by Classy-theme but not by Olivero or Stark.

Excess use of article tag results in incorrect semantic structure for the content.

Using nested article-tags is not against the html-specification but it should not be done lightly.

Steps to reproduce

With Umami demo edit content list view by adding the articles image as field. Use rendered image only.

None of the individual rows presenting an individual node is presented as an article but the main image for each node is presented as independent article content.

Proposed resolution

Default to rendering media/images without wrapping the content inside an article tag. Additional logic may be added to identify a case where the media in itself actually is semantically an individual piece of content. For an admin theme such case has not been identified as individual media are not by default exposed for viewing as individual pages.

Remaining tasks

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Claro 

Last updated 1 day ago

Created by

🇫🇮Finland simohell

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @simohell
  • 🇫🇮Finland simohell

    An example from Voice over rotor why the use of article-tags for each media can be a problem.

  • First commit to issue fork.
  • Status changed to Needs review 12 months ago
  • 🇮🇳India gauravvvv Delhi, India
  • Pipeline finished with Success
    12 months ago
    Total: 1078s
    #150690
  • Status changed to Active 12 months ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    It looks like the <article> use extends beyond Claro - it's in additional places such as the core module template and Stable 9. This could be disruptive to existing sites using <article> as a selector for styling/JS/tests so it really shouldn't happen in 10 outside of Starterkit. Thi change could be introduced in 11, though!

    The adverse effects of this excess <article> use can be somewhat mitigated by labeling these instances using aria-label or a similar approach. That way, assistive tech would see something more descriptive than just Article

    I'm going to keep the "Needs subsystem maintainer review" around as I suspect an additional review will be needed, but that's my review for this stage of the process ✔️

Production build 0.71.5 2024