diff --git a/core/modules/system/templates/pager.html.twig b/core/modules/system/templates/pager.html.twig index 7e2a539267f74059aa4946a5685562b156490bcc..affc1e53a354f1d0ec64e978aeb1e90a7ee16a01 100644 --- a/core/modules/system/templates/pager.html.twig +++ b/core/modules/system/templates/pager.html.twig @@ -33,7 +33,8 @@ */ #} {% if items %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {# Print first item if we are not on the first page. #} {% if items.first %} diff --git a/core/modules/views/templates/views-mini-pager.html.twig b/core/modules/views/templates/views-mini-pager.html.twig index d3aa58f31484291129cd82bb7f73bb9ef3a3f1dd..b18eaef98ef0bd465d295d4d21c993ecbb76b579 100644 --- a/core/modules/views/templates/views-mini-pager.html.twig +++ b/core/modules/views/templates/views-mini-pager.html.twig @@ -13,7 +13,8 @@ */ #} {% if items.previous or items.next %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="js-pager__items"> {% if items.previous %} <li> diff --git a/core/profiles/demo_umami/themes/umami/templates/classy/views/views-mini-pager.html.twig b/core/profiles/demo_umami/themes/umami/templates/classy/views/views-mini-pager.html.twig index be410660afbc43f05b27515c63927e7ffd8a8c56..4b46f2bb1f698633968b8e0290d2730cd1ef52aa 100644 --- a/core/profiles/demo_umami/themes/umami/templates/classy/views/views-mini-pager.html.twig +++ b/core/profiles/demo_umami/themes/umami/templates/classy/views/views-mini-pager.html.twig @@ -11,7 +11,8 @@ */ #} {% if items.previous or items.next %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="pager__heading visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {% if items.previous %} <li class="pager__item pager__item--previous"> diff --git a/core/themes/claro/templates/pager.html.twig b/core/themes/claro/templates/pager.html.twig index 8fc18cd78c5403257f66c1916020f825662dea25..e91a3ff031a1d81d72671471cc2fe211d4c1efaf 100644 --- a/core/themes/claro/templates/pager.html.twig +++ b/core/themes/claro/templates/pager.html.twig @@ -35,7 +35,8 @@ */ #} {% if items %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {# Print first item if we are not on the first page. #} {% if items.first %} diff --git a/core/themes/claro/templates/views/views-mini-pager.html.twig b/core/themes/claro/templates/views/views-mini-pager.html.twig index c4ba977661e0dfff40431116522b3bfe1cbeaf37..c84eb710c9cb1214206d568385ad07c70a4a47ac 100644 --- a/core/themes/claro/templates/views/views-mini-pager.html.twig +++ b/core/themes/claro/templates/views/views-mini-pager.html.twig @@ -18,7 +18,8 @@ ] %} {% if items.previous or items.next %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav{{ attributes.addClass('pager').setAttribute('role', 'navigation').setAttribute('aria-labelledby', heading_id) }}> + <h4{{ title_attributes.addClass('visually-hidden').setAttribute('id', heading_id) }}>{{ 'Pagination'|t }}</h4> <ul{{ content_attributes.addClass('pager__items', 'js-pager__items') }}> {% if items.previous %} {% apply spaceless %} diff --git a/core/themes/olivero/templates/navigation/pager.html.twig b/core/themes/olivero/templates/navigation/pager.html.twig index 88de15e3b91888db26f2c5bcf09363a8ea11334b..29d011513e10c9f039a2bfbab4b57bb62c5396e8 100644 --- a/core/themes/olivero/templates/navigation/pager.html.twig +++ b/core/themes/olivero/templates/navigation/pager.html.twig @@ -31,7 +31,8 @@ */ #} {% if items %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager layout--content-medium" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {# Print first item if we are not on the first page. #} {% if items.first %} diff --git a/core/themes/olivero/templates/views/views-mini-pager.html.twig b/core/themes/olivero/templates/views/views-mini-pager.html.twig index 2e905c41ebe803f02ee8fed808d5e6659a7e1c19..a9acc73a0026a2cac595fa088a9a5e5a2738945f 100644 --- a/core/themes/olivero/templates/views/views-mini-pager.html.twig +++ b/core/themes/olivero/templates/views/views-mini-pager.html.twig @@ -11,7 +11,8 @@ */ #} {% if items.previous or items.next %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {# Print previous item if we are not on the first page. #} {% if items.previous %} diff --git a/core/themes/starterkit_theme/templates/navigation/pager.html.twig b/core/themes/starterkit_theme/templates/navigation/pager.html.twig index d4480a37a03b7c185a3722cd04e998377ebc668f..6f863faaf91206bd7e563c9dde65327b4645ccfa 100644 --- a/core/themes/starterkit_theme/templates/navigation/pager.html.twig +++ b/core/themes/starterkit_theme/templates/navigation/pager.html.twig @@ -31,7 +31,8 @@ */ #} {% if items %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {# Print first item if we are not on the first page. #} {% if items.first %} diff --git a/core/themes/starterkit_theme/templates/views/views-mini-pager.html.twig b/core/themes/starterkit_theme/templates/views/views-mini-pager.html.twig index be410660afbc43f05b27515c63927e7ffd8a8c56..4b46f2bb1f698633968b8e0290d2730cd1ef52aa 100644 --- a/core/themes/starterkit_theme/templates/views/views-mini-pager.html.twig +++ b/core/themes/starterkit_theme/templates/views/views-mini-pager.html.twig @@ -11,7 +11,8 @@ */ #} {% if items.previous or items.next %} - <nav class="pager" role="navigation" aria-label="{{ 'Pagination'|t }}"> + <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}"> + <h4 id="{{ heading_id }}" class="pager__heading visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pager__items js-pager__items"> {% if items.previous %} <li class="pager__item pager__item--previous">