Add aria-sort attribute to Views table output

Created on 10 August 2016, over 8 years ago
Updated 17 February 2023, about 2 years ago

Problem/Motivation

In #1342760: Add aria-sort to table sort we added the aria-sort attribute to our sortable tables. You can find this in the headers of the recent log messages table at admin/reports/dblog, for example.

It would be good to add aria-sort to Views table displays too. The previous issue actually predates the official VDC initiative, and it seems that the views_view_table theme hook doesn't use tablesort_header().

Proposed resolution

Include the aria-sort attribute with the Views table display plugin.

Remaining tasks

  • Add aria-sort to Views table headers - DONE, patching template_preprocess_views_view_table()
  • Tests - confirm presence + direction of aria-sort attribute.

User interface changes

No visual changes.
Adds aria-sort attribute to table headers for assistive tech.

API changes

None.

Data model changes

None.

Feature request
Status

Fixed

Version

10.1

Component
Views 

Last updated about 22 hours ago

Created by

🇬🇧United Kingdom andrewmacpherson

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

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