{% from "../../macros/attributes.njk" import govukAttributes %} {%- if params.type == "success" %} {% set successBanner = true %} {% endif %} {%- if successBanner %} {% set typeClass = "govuk-notification-banner--" + params.type %} {% endif %} {%- if params.role %} {% set role = params.role %} {% elif successBanner %} {#- If type is success, add `role="alert"` to prioritise the information in the notification banner to users of assistive technologies -#} {% set role = "alert" %} {% else %} {#- Otherwise add `role="region"` to make the notification banner a landmark to help users of assistive technologies to navigate to the banner -#} {% set role = "region" %} {% endif %} {%- if params.titleHtml %} {% set title = params.titleHtml | safe %} {%- elif params.titleText %} {% set title = params.titleText %} {%- elif successBanner %} {% set title = "Success" %} {%- else %} {% set title = "Important" %} {%- endif -%}