Make admin list filters behave more consistently.

Created on 22 November 2018, about 6 years ago
Updated 12 July 2024, 5 months ago

Problem/Motivation

We have several filterable admin listings in Drupal core, e.g. the modules page.
The behaviour of these is inconsistent in various ways:

  • The way they are labelled
  • Some have feedback for screen reader users, others don't.

Filterable lists in core:

  • Modules install
  • Modules uninstall
  • Simpletest - Drupal.behaviors.simpletestTableFilterByText
  • Blocks - Drupal.behaviors.blockFilterByText
  • Views main listing - Drupal.behaviors.viewTableFilterByText
  • Views handlers ("add field" dialog, etc)
  • Layout builder blocks - in progress, see #2998862: The Layout Builder block listing should be filterable
  • .

Proposed resolution

Add announcements to filters which don't have them yet.

Consistent language in filter field - label, description. 🐛 Admin list filter fields are inconsistently labelled. Active
Consistent language in Drupal.announce() messages.
Correct pluralization of result count in Drupal.announce().
Drupal.announce() should also announce that all items are shown, after a user clears the filter field (i.e. no items are hidden).
Search by machine name and human-readable name where appropriate.
Display machine name in any lists that allow filtering on it.

Creating a reusable component for this? To remove the individual implementations we have so far. NEEDS CHILD ISSUE.

  • Views main listing has one filter which controls 2 lists.
  • Views handlers have 2 inputs that both control the same list (a text field and a select).

Add behaviour to visually highlight the matched strings in the result list?

Add a developer handbook page about all this, with all the advice they need to follow.

Remaining tasks

See related/child issues.
Anything else?

User interface changes

Improvements to filterable lists, for consistency and accessibility.

API changes

TBD - possibility of introducing a re-usable filter component.

Data model changes

TBD - none?

🌱 Plan
Status

Active

Version

11.0 🔥

Component
Other 

Last updated about 1 hour 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.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

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