Problem/Motivation

Drupal core's admin UI makes extensive use of tables to list content and configuration.

There are a number of things we could do to improve the semantics of our admin tables, which will benefit users of assisitive technology.

Row-level table headers

Screen-readers can annouce the row + column headers for the current cell, but currently we only use column-level headers. In the abscence of row-level headers, some screen readers will treat the first cell in the row as a header, but in Drupal this is often a checkbox or tabledrag handle. Explicit row-level headers would be clearer.

Table captions

These help a user understand the point of the table, without having to explore inside it:

  • On entering a table, a screen reader user is given the caption. Helpful to confirm you have the right table, or if you want to skip the table entirely.
  • Screen readers have tools to let users skip from one table to the next, or identify all tables on the page (e.g. the macOS VoiceOver WebRotor). This is especially important on pages that have more than one table. Current examples of these include:
    • Views UI listing - enabled and disabled views are listed in separate tables.
    • Workflow UI - content moderation has 3 tables, for states, transitions, and eligible content entity bundles.
    • Display modes - There are 5 tables on the View modes page after a standard install. This could grow to quite a lot of tables, if as more modules are enabled which provide entity types (Commerce, Registrations, CRM, Media, ECK, etc.).
    • The Modules page. There's a table for every package group, so there's really no limit to how many tables could end up on this page. I checked a modest D8 site and it already had 20 tables. Captions would be enormously helpful for finding the right package group, as there aren't any headings for them.

Proposed resolution

Add row-level table headers to tables in the admin UI.

Add table captions to most (probably all) tables in the admin UI.

  • Decide what captions to use for individual tables. Fix these in child issues?
  • Views table displays already support captions, but we aren't using any for core admin UI tables yet.
  • Tables from EntityListBuilder subclasses can have captions added via Form API properties.

Miscellaneous other improvements

Make sortable columns easier for all users to understand.

We need to convey the "sortable" column behaviour, and "currently sorted" column state, to all users.

Remaining tasks

Most work is in child issues.

User interface changes

Adds explicit labeling to tables in the admin UI, in a way that can be identified programatically by assistive technology. Screen reader users are the main group to benefit from this, but some other assistive technology may beneift too, e.g. switch access or speech control.

This won't necessarily mean any visual changes to the UI. Table captions can be visually-hidden in most cases.

API changes

None.

Data model changes

None.

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Issue summary: View changes

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andrewmacpherson’s picture

Issue summary: View changes
andrewmacpherson’s picture

Related issue for tables with irregular headers, we should review this for accessibility.

tim.plunkett’s picture

Issue tags: -accessibility (duplicate tag) +Accessibility

Fixing tag

andrewmacpherson’s picture

Issue summary: View changes
Issue tags: +accessibility (duplicate tag)

The accessibility tag is behaving weirdly. Please leave both on for now.

andrewmacpherson’s picture

Issue summary: View changes

didn't mean to delete the issue summary, I was editing it at the time..

andrewmacpherson’s picture

Issue summary: View changes

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andrewmacpherson’s picture

Issue summary: View changes
Priority: Normal » Major
Related issues: +#3038386: Improve accessibility of Views table sortable columns

#3038386: Improve accessibility of Views table sortable columns was filed, and this has revealed that there are more aspects to sortable columns than I thought at first.

We need to convey the "sortable" column behaviour, and "currently sorted" column state, to all users.

Bumping to Major status - this is now quite an extensive set of improvements.

andrewmacpherson’s picture

Issue tags: -accessibility (duplicate tag)

tag cleanup

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.