Opened 4 weeks ago

Closed 11 days ago

#36976 closed Cleanup/optimization (fixed)

Make action selection counter on admin list pages announce changes

Reported by: David Ansa Owned by: David Ansa
Component: contrib.admin Version: 6.0
Severity: Normal Keywords: accessibility
Cc: aamir_official, Elias Stinson Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The admin changelist action counter updates dynamically when selecting or deselecting rows, but the updates are not explicitly announced as live content for assistive technologies.

This can make it harder for screen reader users to perceive selection count changes while performing bulk actions.

Proposed fix

Mark the counter as a polite live region and atomic:

aria-live="polite"
aria-atomic="true"
Patch summary

Updated django/contrib/admin/templates/admin/actions.html:
Added aria-live and aria-atomic attributes to .action-counter.
Added regression test in tests/admin_views/tests.py:
test_actions_counter_is_live_region
Why this is safe

Markup-only accessibility enhancement.
No behavior or JavaScript logic changes.
Existing UI behavior remains unchanged.

Change History (8)

comment:1 by aamir_official, 4 weeks ago

Cc: aamir_official added
Owner: set to aamir_official
Status: newassigned

Hi, I'd like to work on this ticket. I'll submit a PR adding aria-live="polite" and aria-atomic="true" to the action-counter element in actions.html, along with a regression test.

comment:2 by David Ansa, 4 weeks ago

Go ahead, see the issue on git.

comment:3 by Elias Stinson, 4 weeks ago

Cc: Elias Stinson added
Component: Uncategorizedcontrib.admin
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

I'll second this, and I will change the triage status to accepted, as this seems like a needed and easy improvement to the overall accessibility of Django-based projects. I will also mark it as being a contrib.admin issue, as that's the subject at hand. I also feel that cleanup/optimization is the only real fitting thing, as this isn't a completely new feature, but also isn't a bug. Anyways, good luck to all, and I will CC myself so I can keep track and help if needed!

comment:4 by Jacob Walls, 4 weeks ago

Easy pickings: set
Has patch: set
Keywords: accessibility added
Owner: changed from aamir_official to David Ansa
Summary: Admin: make action selection counter a live regionMake action selection counter on admin list pages announce changes
Triage Stage: AcceptedReady for checkin

comment:5 by Tim Schilling, 2 weeks ago

Should we expand the scope of this issue to every instance where we use element.textContent = in JavaScript? I spotted 3 other files besides actions.js. They were SelectFilter2, DateTimeShortcuts, calendar and RelatedObjectLookups.

Version 0, edited 2 weeks ago by Tim Schilling (next)

comment:6 by Jacob Walls, 2 weeks ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Smart idea, let's audit those too, but let's check each one. The DateTimeShortcuts example shouldn't be a live region, since it just updates once on page load.

comment:7 by Jacob Walls, 11 days ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:8 by Jacob Walls <jacobtylerwalls@…>, 11 days ago

Resolution: fixed
Status: assignedclosed

In 72e8fdd6:

Fixed #36976 -- Made admin action counter a live region for screen readers.

Note: See TracTickets for help on using tickets.
Back to Top