Fix pager h4 for accessibility on Stable9

Created on 13 January 2023, almost 2 years ago
Updated 21 June 2024, 5 months ago

Problem/Motivation

The pager by default uses an h4, this creates the `Heading levels should only increase by one` error in many use cases.

This has been addressed for all non stable9 core themes in 🐛 Pager h4 causes accessibility flag on many pages Fixed
Since it is an accessibility fix stable9 should also be updated.
@laurii and @xjm confirmed as long as it gets a release note.

Steps to reproduce

Create a view with a mini pager or full pager that has no other content on the page.
Run axe devtools

Proposed resolution

@andrewmacpherson's objection in comment 10 is related to a previous approach that was resolved in the parent issue.
This fix implements an approved solution for all other core themes in stable 9.
Follow accessibility review guidelines from 🐛 Pager h4 causes accessibility flag on many pages Fixed
Sidenote: the initial approach discussed on the above issue of moving the heading text into an aria-label attribute on the parent tag, and thereby removing the Heading element altogether will indeed help pass many accessibility tests, but is detrimental to actual users. See comment #30 from @andrewmacpherson for full details.
The final resolution for an accessible pager heading was to add a new configuration option in views pagers.

This issue updates stable9 templates to use the new pagination_heading_level variable.
Update tests to include stable9

Remaining tasks

Apply only to 10.3 since that introduces the new pagination_heading_level variable.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

  • Stable9 views mini pager template updated to use new pagination_heading_level variable (Defaults to h4)

  • Stable9 pager template updated to use new pagination_heading_level variable (Defaults to h4)

🐛 Bug report
Status

Fixed

Version

10.3

Component
Markup 

Last updated 16 days ago

No maintainer
Created by

🇺🇸United States nicxvan

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024