{% macro govukErrorSummary(params) %} {% from "govuk_frontend_jinja/macros/attributes.html" import govukAttributes -%}
{#- Keep the role="alert" in a seperate child container to prevent a race condition between the focusing js at the alert, resulting in information getting missed in screen reader announcements #}

{{ params.titleHtml | safe | trim | indent(6) if params.titleHtml else params.titleText }}

{% if caller or params.descriptionHtml or params.descriptionText %}

{{ caller() if caller else (params.descriptionHtml | safe | trim | indent(8) if params.descriptionHtml else params.descriptionText) }}

{% endif %} {% if params.errorList | length %} {% endif %}
{% endmacro %}