Problem/Motivation
The uninstall page (admin/modules/uninstall
) has a text filter to make it easy to find a module you are interested in.
When filtering the list, Drupal.announce()
is used to inform screen reader users how many rows are now shown on the page. However, this announcement is always "0 modules are available in the modified list" no matter whether there are matches or not.
The same Drupal.behaviors.tableFilterByText
is used for both the install and uninstall pages, but the page structure is different. It looks like the filter logic only works properly on the install page.
Proposed resolution
Fix the Drupal.announce() message so the module count is correct.
Investigate the jQuery CSS selectors used by system.modules.es6.js
to see why the counts passed to Drupal.announce() are wrong.
Remaining tasks
- Fix
system.modules.es6.js
filter logic so it uses the correct count. - Use
Drupal.formatPlural()
for the message text. NOTE: the announcement on the install page doesn't correctly pluralize, so this issue overlaps with #2715663: Use Drupal.formatPlural for when announcing module-filter results for screenreader users. - Update the transpiled
system.module.js
- FunctionJavascript tests. Test the expected message for 0, 1, and multiple matches. Use the test logic from #2805205: Provide screen-reader feedback when filtering by block name. as a starting point.
User interface changes
Fixes a bug in a custom screen reader announcement.
API changes
None.
Data model changes
None.