Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / templates / field.html.twig
index babc512ca8dd16bfb67a852bf1b9f99e198fcd7d..1497678b50adebc171caf686415d14bc95a7aecd 100644 (file)
  * @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 %}