diff core/modules/system/templates/field.html.twig @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/system/templates/field.html.twig	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/system/templates/field.html.twig	Thu Feb 28 13:21:36 2019 +0000
@@ -38,6 +38,11 @@
  * @ingroup themeable
  */
 #}
+{%
+  set title_classes = [
+    label_display == 'visually_hidden' ? 'visually-hidden',
+  ]
+%}
 
 {% if label_hidden %}
   {% if multiple %}
@@ -53,7 +58,7 @@
   {% endif %}
 {% else %}
   <div{{ attributes }}>
-    <div{{ title_attributes }}>{{ label }}</div>
+    <div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
     {% if multiple %}
       <div>
     {% endif %}