Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294882

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 294882

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>