Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

A new configuration option for mini and full type pagers for heading level has been added to views.
This will allow sites to change the heading level on a per view basis to assist with making the view more accessible.

This is the preferred approach for solving errors related to Drupal views pagination reported by accessibility testing tools with error messages like:

  • Headings are not structured. Reported by Siteimprove.
  • One or more heading levels have been skipped. Reported by Siteimprove.
  • Skipped heading level. Reported by Wave WebAIM.
  • Heading levels should only increase by one. Reported by various tools.

Pager templates and views mini pager templates for core, claro, olivero, and starterkit_theme have been updated to read the options from the pager. If you have overridden these pager templates you will need to update your templates accordingly to make use of this feature.

A new variable for views mini pagers and full pagers called pagination_heading_level has been added. This is an optional setting (defaults to h4).

Before

<h4 id="{{ heading_id }}" class="pager__heading visually-hidden">{{ 'Pagination'|t }}</h4>

After

<{{ pagination_heading_level }} id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</{{ pagination_heading_level }}>

UI Changes
New pager heading level interface

AttachmentSize
PagerHeadingLevelViews.png88.02 KB
Impacts: 
Site builders, administrators, editors
Module developers
Themers
Site templates, recipes and distribution developers