Node Card template h3 causes accessibility issues

Created on 23 June 2025, 11 days ago

Problem/Motivation

Accessibility issue with base install of Drupal CMS due to Olivero theme template. That's not good for Drupal's commitment to accessibility.

I am making an assumption that the contrib theme drupal_cms_olivero is the same in this respect as the core theme!

Steps to reproduce

Default install of Drupal CMS on Drupal 11.2 with News and Accessibility Recipes installed.
Visit the news listing page at /news.
Editorially reports an error with the news card title being an h3 because a h2 has been skipped.

Proposed resolution

It seems problematic to impose a heading level on content that could appear anywhere on the site. The template in question is used for all node cards and the heading level is hard-coded.

Change /themes/contrib/drupal_cms_olivero/templates/content/node--card.html.twig
Use a structure agnostic class for the node title.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.2 🔥

Component

Olivero theme

Created by

🇬🇧United Kingdom dunx

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024