Opened 7 months ago

Last modified 3 weeks ago

#36510 assigned Cleanup/optimization

Header text for pagination contains title of table while it's the only pagination on the page.

Reported by: laurenherregodts Owned by: SnippyCodes
Component: contrib.admin Version: 5.2
Severity: Normal Keywords: accessibility, pagination
Cc: Thibaud Colas, Antoliny, Harsh007 Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description

On the page Release in the django admin demo project, the pagination underneath the table has Pagination release as h2 header text.

This has been identified while using the Landmark check of AXE. No accessibility issue was flagged, but just wondering if the release in the header text is needed.
I believe release can be removed from the header text since there is only one pagination present on the page.

Change History (11)

comment:1 by Thibaud Colas, 7 months ago

Cc: Thibaud Colas added
Triage Stage: UnreviewedAccepted

Thank you! This looks like a recent change from #36366, in PR Fixed #36366 -- Improved accessibility of pagination in the admin. #19448.

I think this label tweak would work much better for its intended audience, but this will probably need accessibility team discussion on how best to achieve the desired results. The issue I see is that for _landmark names_ verboseness isn’t desirable. If we wanted the added context we would be better off with aria-describedby.

comment:2 by Antoliny, 7 months ago

Cc: Antoliny added

comment:3 by Antoliny, 7 months ago

First of all, thank you for submitting the ticket :)
As you mentioned, if multiple paginations are applied, using "pagination + model name" is naturally necessary.
However, even if only one pagination is used on the admin ChangeList page, I do not think that "pagination + model name" becomes excessive information that interferes with screen reader users.
On the contrary, I believe it is necessary information that provides clarity.
Since a web page can usually contain many models and therefore many different ChangeList pages for those models, "pagination + model name" can help screen reader users perceive at once which model's pagination this is.
So, I feel there is no need to remove the model name deliberately.

Last edited 7 months ago by Antoliny (previous) (diff)

comment:4 by Shrikant Sudam Giri, 4 months ago

Hi everyone 👋
I’m interested in contributing to this issue as part of learning Django’s admin internals.
Before I start working on a patch, could you please confirm whether the accessibility team has reached a final decision on this?
If it’s still open for discussion, I’d be happy to explore options that balance clarity for screen readers with minimal verbosity.

Thanks!

comment:5 by VIZZARD-X, 3 months ago

Hello,

I'm interested in working on this issue and would like to move it forward.
Before preparing a patch, could we confirm the intended direction from the accessibility team?

Specifically:
Should the pagination landmark always include the model name (e.g., "Pagination Release")?
Or should the model name be omitted when there's only one pagination component on the page?
Once there is agreement on the desired behaviour, I’ll be happy to implement the change and prepare a PR aligned with the decision.

comment:6 by HarshAlreja, 6 weeks ago

Has patch: set

I have submitted a PR for this ticket: https://github.com/django/django/pull/20513

comment:7 by Harsh007, 3 weeks ago

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

comment:8 by Jacob Walls, 3 weeks ago

Patch needs improvement: set

Linters are failing and agent diagnostics not scrubbed

comment:9 by Harsh007, 3 weeks ago

Has patch: unset
Owner: Harsh007 removed
Status: assignednew

comment:10 by SnippyCodes, 3 weeks ago

Owner: set to SnippyCodes
Status: newassigned

comment:11 by SnippyCodes, 3 weeks ago

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