Sha256: 976726d782067c8ccd7bfbaa0e1f2e10fe932838e83cc3ed78acc1f813373359

Contents?: true

Size: 1.59 KB

Versions: 55

Compression:

Stored size: 1.59 KB

Contents

{% from "../../macros/attributes.njk" import govukAttributes -%}

<div class="govuk-error-summary
  {%- if params.classes %} {{ params.classes }}{% endif %}"
  {%- if params.disableAutoFocus !== undefined %} data-disable-auto-focus="{{ params.disableAutoFocus }}"{% endif %}
  {{- govukAttributes(params.attributes) }} data-module="govuk-error-summary">
  {#- 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 #}
  <div role="alert">
    <h2 class="govuk-error-summary__title">
      {{ params.titleHtml | safe | trim | indent(6) if params.titleHtml else params.titleText }}
    </h2>
    <div class="govuk-error-summary__body">
      {% if caller or params.descriptionHtml or params.descriptionText %}
      <p>
        {{ caller() if caller else (params.descriptionHtml | safe | trim | indent(8) if params.descriptionHtml else params.descriptionText) }}
      </p>
      {% endif %}
      {% if params.errorList | length %}
        <ul class="govuk-list govuk-error-summary__list">
        {% for item in params.errorList %}
          <li>
          {% if item.href %}
            <a href="{{ item.href }}"
              {{- govukAttributes(item.attributes) }}>
              {{- item.html | safe | trim | indent(12) if item.html else item.text -}}
            </a>
          {% else %}
            {{ item.html | safe | trim | indent(10) if item.html else item.text }}
          {% endif %}
          </li>
        {% endfor %}
        </ul>
      {% endif %}
    </div>
  </div>
</div>

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
govuk_publishing_components-51.1.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-51.0.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-50.0.1 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-50.0.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-49.1.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-49.0.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-48.0.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-47.0.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-46.4.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-46.3.1 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-46.3.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-46.2.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-46.1.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-46.0.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-45.10.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-45.9.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-45.8.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-45.7.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-45.6.1 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk
govuk_publishing_components-45.6.0 node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk