You are here

status-messages.html.twig in Zircon Profile 8.0

Default theme implementation for status messages.

Displays status, error, and warning messages, grouped by type.

An invisible heading identifies the messages for assistive technology. Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html for info.

Add an ARIA label to the contentinfo area so that assistive technology user agents will better describe this landmark.

Available variables:

  • message_list: List of messages to be displayed, grouped by type.
  • status_headings: List of all status types.
  • display: (optional) May have a value of 'status' or 'error' when only displaying messages of that specific type.

See also

template_preprocess_status_messages()

File

core/themes/bartik/templates/status-messages.html.twig
View source
  1. {% extends "@classy/misc/status-messages.html.twig" %}
  2. {#
  3. /**
  4. * @file
  5. * Default theme implementation for status messages.
  6. *
  7. * Displays status, error, and warning messages, grouped by type.
  8. *
  9. * An invisible heading identifies the messages for assistive technology.
  10. * Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html
  11. * for info.
  12. *
  13. * Add an ARIA label to the contentinfo area so that assistive technology
  14. * user agents will better describe this landmark.
  15. *
  16. * Available variables:
  17. * - message_list: List of messages to be displayed, grouped by type.
  18. * - status_headings: List of all status types.
  19. * - display: (optional) May have a value of 'status' or 'error' when only
  20. * displaying messages of that specific type.
  21. *
  22. * @see template_preprocess_status_messages()
  23. */
  24. #}
  25. {% block messages %}
  26. {% if message_list is not empty %}
  27. {{ attach_library('bartik/messages') }}
  28. <div class="messages__wrapper layout-container">
  29. {{ parent() }}
  30. </div>
  31. {% endif %}
  32. {% endblock messages %}