Claro details component does not have the right class

Created on 20 July 2022, over 2 years ago
Updated 6 June 2024, 7 months ago

Problem/Motivation

Claro theme does not have the right form error class.
The files core/themes/claro/templates/details.html.twig and core/themes/claro/templates/navigation/details--vertical-tabs.html.twig have the class "form-item--error-message" but in the stylesheet core/themes/claro/css/components/form.css is defined "form-item__error-message" so if any error is displayed on the details component it is shown without styles.

Steps to reproduce

  • Make claro the default theme, so the test page we visit is rendered by Claro
  • Enable the inline_form_errors module
  • Enable the form_test module. It is a test module so you'll need $settings['extension_discovery_scan_tests'] = TRUE; in your settings if it isn't already there.
  • Go to form_test/details-form and submit the form. There will be an error "I am an error on the details element." that should be styled red but it is not due to the class being incorrect as reported

Proposed resolution

Use the right class.

Test for this by expanding \Drupal\form_test\Form\FormTestDetailsForm to try with Claro in addition to the default test theme, and assert the expected class is present.

🐛 Bug report
Status

Fixed

Version

10.3

Component
Theme 

Last updated about 23 hours ago

Created by

🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

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

Merge Requests

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