Commit ae6bde2e authored by dimitriskr's avatar dimitriskr Committed by Sohail Lajevardi
Browse files

Issue #3260596 by dimitriskr: Field template does not respect visually-hidden option for label

parent d4844d26
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -5,6 +5,13 @@
 */
#}

{%
  set title_classes = [
    'field__label',
    label_display == 'visually_hidden' ? 'visually-hidden',
  ]
%}

{% if label_hidden %}
  {% if multiple %}
    <div{{ attributes }}>
@@ -19,7 +26,7 @@
  {% endif %}
{% else %}
  <div{{ attributes }}>
    <div{{ title_attributes }}>{{ label }}</div>
    <div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
    {% if multiple %}
      <div>
    {% endif %}