Excess use of article HTML-tag for media

Created on 21 March 2024, 6 months ago
Updated 19 April 2024, 5 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
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland simohell

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

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Gauravvvv โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India
  • Pipeline finished with Success
    5 months ago
    Total: 1078s
    #150690
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave
  • Status changed to Active 5 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