Use Drupal.formatPlural for when announcing module-filter results for screenreader users

Created on 29 April 2016, about 8 years ago
Updated 26 January 2023, over 1 year ago

Problem/Motivation

The module-filter search field on the admin/modules page announces the number of results to screen reader users. However it doesn't handle singular/plural correctly, so when only ONE module is available, it announces "1 modules are available...".

To replicate: install the Standard profile, then search for "tel" while a screen reader is running. The only match is the telephone field module.

Proposed resolution

Use Drupal.formatPlural() for the message which is passed to Drupal.announce() in system.modules.js

Remaining tasks

  • Patch system.modules.js - DONE.
  • FunctionalJavascript tests for module filter behaviour, asserting correct drupal.announce() messages - DONE.

User interface changes

No visible changes.
Improves the announcement made to a screenreader user when there is only one result in the filtered module list.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
SystemΒ  β†’

Last updated about 22 hours ago

No maintainer
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.69.0 2024