Wrong document outline because of Term reference label in h3

Created on 2 September 2012, about 13 years ago
Updated 18 September 2025, 15 days ago

The label of a Term reference field is enclosed in a h3 element, while other fields like List, Text etc. use a div element.

In many situations, this will create a false outline for the document.


A node "My cat" has three fields (displayed in this order): Name (Text field), Tags (Term reference), Description (Long text).
The document outline would be:

  1. (h1 missing)
    1. h2: Main menu
    2. h2: You are here
  2. h1:
    1. (h2 missing)
      1. h3:

The "Description" (Long text) would be in the scope of the headline "Tags", which would be not correct, of course.

Apart from the semantic problem, this is a problem for accessibility, too: some screen-reader users use a document outline to jump to sections they are interested in. Because of the Term reference label being a heading (while all other labels not), these users might miss content that comes after that heading (like the Description in this example), when they are not interested in "Tags".

I can think of two possible solutions: use a heading for every field label OR don't use a heading for any field label.

Side effect of the Term reference label being an exceptional case: the field labels are inconsistently styled, all other labels are bolder and slightly bigger.

See also: #1169216: Unwanted

in field label →

🐛 Bug report
Status

Needs work

Version

1.0

Component

Look and Feel

Created by

🇩🇪Germany no2e

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.

  • html5

    Implements and supports the use of HTML5.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024