Unnecessary <strong> element in Umami's form-element template may produce invalid markup

Created on 31 October 2018, about 6 years ago
Updated 14 September 2023, about 1 year ago

Problem/Motivation

The form-element.html.twig template in Classy wraps inline error messages in a <strong> element.

  • The minor issue is that it makes no sense to denote the whole error message.
  • The bigger one is that inline form errors may contain html elements, such as an item list, and in that case, the raw markup breaks validation: <strong> cannot contain grouping elements such as <div> or ul, these can be used only where flow content is expected.

W3C Current recommendation, W3C Working draft

Proposed resolution

Remove the <strong> element from the core/themes/classy/templates/form/form-element.html.twig template and add `font-weight: bold;` for `.form-item--error-message`.

Remaining tasks

Provide a patch.

User interface changes

Themes that extending Classy should (must?) be reviewed.

API changes

Nothing.

Data model changes

Nothing.

🐛 Bug report
Status

Fixed

Version

10.1

Component
Umami 

Last updated 9 days ago

Created by

🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺

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

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

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.

Production build 0.71.5 2024