1. Wrap them in a `<nav aria-label="{% translate 'Breadcrumbs' %}>">`
region, so they can be identified as a navigation landmark by screen
reader users.
2. Structure the links as a `<ol>` list with `<li>` items for each crumb,
so screen reader users know how many items there are (visually they don’t
need any changes)
3. Switch the last item to also be a link, with a `aria-current="page"`
attribute, so semantically the last item is marked as "current page"
(again doesn’t necessarily need any visual change). Technically this would
also work as a span but I believe switching to a link would be a nicer
experience (consistent tabbing through all items in the breadcrumb)
All three improvements are based on the
[https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ Breadcrumb ARIA
authoring practices pattern]. All can technically be done separately if
desired.
--
Ticket URL: <https://code.djangoproject.com/ticket/34041>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:1>
* type: New feature => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:2>
* owner: nobody => Florian Perucki
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:3>
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/16106
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:5>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"872b61193b013a700ff88cf50f0eb2cf2c266ff7" 872b6119]:
{{{
#!CommitTicketReference repository=""
revision="872b61193b013a700ff88cf50f0eb2cf2c266ff7"
Refs #34041 -- Added navigation landmark to breadcrumbs in admin.
Thanks Thibaud Colas for pair programming.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:6>
* has_patch: 1 => 0
* stage: Ready for checkin => Accepted
Old description:
> There are two nice and simple accessibility improvements we could make to
> the Django admin’s breadcrumbs:
>
> 1. Wrap them in a `<nav aria-label="{% translate 'Breadcrumbs' %}>">`
> region, so they can be identified as a navigation landmark by screen
> reader users.
> 2. Structure the links as a `<ol>` list with `<li>` items for each crumb,
> so screen reader users know how many items there are (visually they don’t
> need any changes)
> 3. Switch the last item to also be a link, with a `aria-current="page"`
> attribute, so semantically the last item is marked as "current page"
> (again doesn’t necessarily need any visual change). Technically this
> would also work as a span but I believe switching to a link would be a
> nicer experience (consistent tabbing through all items in the breadcrumb)
>
> All three improvements are based on the
> [https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ Breadcrumb ARIA
> authoring practices pattern]. All can technically be done separately if
> desired.
New description:
There are two nice and simple accessibility improvements we could make to
the Django admin’s breadcrumbs:
1. (fixed in **872b61193b013a700ff88cf50f0eb2cf2c266ff7**) Wrap them in a
`<nav aria-label="{% translate 'Breadcrumbs' %}>">` region, so they can be
identified as a navigation landmark by screen reader users.
2. Structure the links as a `<ol>` list with `<li>` items for each crumb,
so screen reader users know how many items there are (visually they don’t
need any changes)
3. Switch the last item to also be a link, with a `aria-current="page"`
attribute, so semantically the last item is marked as "current page"
(again doesn’t necessarily need any visual change). Technically this would
also work as a span but I believe switching to a link would be a nicer
experience (consistent tabbing through all items in the breadcrumb)
All three improvements are based on the
[https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ Breadcrumb ARIA
authoring practices pattern]. All can technically be done separately if
desired.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:7>
* owner: Florian Perucki => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:8>
* owner: (none) => Jerry Wan
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:9>
* has_patch: 0 => 1
Comment:
Link to PR: https://github.com/django/django/pull/16414
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:10>
* cc: Tom Carrick (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:11>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34041#comment:12>