Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / themes / stable / templates / field / field.html.twig
index 05d6e8235a61811e8391bc2bfe3df1e72fdbec62..a10384dd6e4abf4cc02aa7f933b95e51906d1858 100644 (file)
  * @see template_preprocess_field()
  */
 #}
+{%
+  set title_classes = [
+    label_display == 'visually_hidden' ? 'visually-hidden',
+  ]
+%}
 
 {% if label_hidden %}
   {% if multiple %}
@@ -51,7 +56,7 @@
   {% endif %}
 {% else %}
   <div{{ attributes }}>
-    <div{{ title_attributes }}>{{ label }}</div>
+    <div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
     {% if multiple %}
       <div>
     {% endif %}