{% set title_id = title_id|default('fr-summary-title--' ~ random()) %}
{% set title_tag = title_tag|default('h2') %}
<nav{{ attributes.addClass('fr-summary').setAttribute('role', 'navigation').setAttribute('aria-labelledby', title_id) }}>
  <{{ title_tag }} class="fr-summary__title" id="{{ title_id }}">{{ title }}</{{ title_tag }}>
  <ol class="fr-summary__list">
    {% for link in links %}
      <li>
        {% set link_attributes = link.attributes|default({}) %}
        {% set link_attributes = create_attribute(link_attributes) %}
        {% set url = link.url|default(link_attributes.href) %}
        <a{{ link_attributes.addClass('fr-summary__link').setAttribute('href', url) }}>{{ link.title }}</a>
      </li>
    {% endfor %}
  </ol>
</nav>
