The button should be included in a landmark

Created on 16 December 2021, almost 3 years ago
Updated 6 February 2023, almost 2 years ago

Problem/Motivation

An accessibility best practice is to include all perceivable content in a landmark: https://www.w3.org/TR/wai-aria-practices/examples/landmarks/index.html . This is not the case for the "back to top" button: since the button is just appended to the body, there is no landmark set on it. And since it's added via Javascript, it's not possible to add the wrapper via template either.

Steps to reproduce

Add and enable the "back to top" module to a website, then run an accessibility checker such as Siteimprove's accessibility checker. The issue will be flagged.

Proposed resolution

Wrap the button in a div with an appropriate role, and set an aria label to it.

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇹Italy nironan

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