[Django] #34833: Use a `main` landmark in the admin interface

12 views
Skip to first unread message

Django

unread,
Sep 13, 2023, 2:06:48 AM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
-----------------------------------------+------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Related: [https://code.djangoproject.com/ticket/34832#ticket #34832].
Currently the Django admin’s main content area is coded as `<div
class="main shifted" id="main"></div>`. For screen reader users, it would
be helpful to switch to a `<main>` tag or add `role="main"`. They would be
able to navigate straight to this area when going through the page by
landmark.

Usage of the correct HTML main tag is ideal, but might prove problematic
if CSS was written with overly specific HTML elements. We can get the same
benefits for screen reader users with `role="main"`.

--
Ticket URL: <https://code.djangoproject.com/ticket/34833>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 13, 2023, 2:10:08 AM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
--------------------------------------+------------------------------------

Reporter: Thibaud Colas | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Uncategorized => Cleanup/optimization
* component: Uncategorized => contrib.admin
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:1>

Django

unread,
Sep 13, 2023, 2:20:05 AM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
--------------------------------------+------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0

--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* easy: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:2>

Django

unread,
Sep 13, 2023, 2:27:02 AM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
-------------------------------------+-------------------------------------

Reporter: Thibaud Colas | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
screen reader, landmarks |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Thibaud Colas):

* keywords: => accessibility, screen reader, landmarks


Old description:

> Related: [https://code.djangoproject.com/ticket/34832#ticket #34832].
> Currently the Django admin’s main content area is coded as `<div
> class="main shifted" id="main"></div>`. For screen reader users, it would
> be helpful to switch to a `<main>` tag or add `role="main"`. They would
> be able to navigate straight to this area when going through the page by
> landmark.
>
> Usage of the correct HTML main tag is ideal, but might prove problematic
> if CSS was written with overly specific HTML elements. We can get the
> same benefits for screen reader users with `role="main"`.

New description:

Related: [https://code.djangoproject.com/ticket/34832#ticket #34832].
Currently the Django admin’s main content area is coded as `<div
class="main shifted" id="main"></div>`. For screen reader users, it would
be helpful to switch to a `<main>` tag or add `role="main"`. They would be
able to navigate straight to this area when going through the page by
landmark.

Usage of the correct HTML main tag is ideal, but might prove problematic
if CSS was written with overly specific HTML elements. We can get the same
benefits for screen reader users with `role="main"`.

---

See [https://dequeuniversity.com/rules/axe/4.8/landmark-one-
main?application=RuleDescription recommendation from Axe] on the
importance of having a main landmark.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:3>

Django

unread,
Sep 13, 2023, 5:31:50 AM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: Sarah
Type: | Abderemane
Cleanup/optimization | Status: assigned

Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
screen reader, landmarks |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Abderemane):

* owner: nobody => Sarah Abderemane
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:4>

Django

unread,
Sep 13, 2023, 6:25:33 PM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: Sarah
Type: | Abderemane
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
screen reader, landmarks |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Abderemane):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/17260 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:5>

Django

unread,
Sep 13, 2023, 11:47:37 PM9/13/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: Sarah
Type: | Abderemane
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Ready for
screen reader, landmarks | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:6>

Django

unread,
Sep 14, 2023, 12:16:04 AM9/14/23
to django-...@googlegroups.com
#34833: Use a `main` landmark in the admin interface
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: Sarah
Type: | Abderemane
Cleanup/optimization | Status: closed
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution: fixed

Keywords: accessibility, | Triage Stage: Ready for
screen reader, landmarks | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"91e617c743b21a0ebad01f18623a8b31f6f58500" 91e617c7]:
{{{
#!CommitTicketReference repository=""
revision="91e617c743b21a0ebad01f18623a8b31f6f58500"
Fixed #34833 -- Made admin's main content render in <main> tag.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34833#comment:7>

Reply all
Reply to author
Forward
0 new messages