-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Fixed #34909 -- Associated links in admin navigation sidebar with row descriptions. #17388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Thank you for your contribution 💪
As it's your first contribution be sure to check out the patch review checklist.
If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!
If you have any design or process questions then you can ask in the Django forum.
Welcome aboard ⛵️!
a17d748
to
0fef9cc
Compare
0fef9cc
to
4478811
Compare
Thank you @erosselli for this work! I have one question: when a user using the voice control system says Separately, I would suggest that one or two extra tests are added covering the new structure of the I'll be marking the ticket as "patch needs improvement", but please once you push these changes, please unset the ticket flags "patch needs improvement" and "patch needs tests" so it shows again in the review queue. |
Hi @nessita , when using voice control, all actionable items will be numbered. When you say something like "Click Add", it will number the buttons that matched the name (in this case "Add"), and you can then say the number of the button you want to click. See screenshot below |
4478811
to
3bad1f0
Compare
@nessita I have added a test for the accessible button names |
Thank you @erosselli! The branch looks great. Question: could we use a more verbose (From my understanding of how |
Hi @nessita , I think it should work, as long as |
3bad1f0
to
50185e5
Compare
I'm unable to reproduce the Selenium issue locally and it seems quite unrelated to this change. |
50185e5
to
573e6c3
Compare
@erosselli Thanks 👍 Welcome aboard ⛵ I made small edits to tests, pushed template refactoring to a separate commit. |
@felixxm yesterday I've pinged the Accessibility team for a review and they will complete it soon, so the merging should wait until then. Thanks! |
I know, have you seen my comment on Discord? I don't think we need another round of manual accessibility tests, I'm going to merge it today or tomorrow. |
I didn't before, now I did :-)
Ok, thanks. |
… descriptions. This adds aria-describedby attribute to the models' links in the admin navigation sidebar. Thanks Thibaud Colas for the review. Co-authored-by: Dara Silvera <[email protected]>
573e6c3
to
c83c639
Compare
Problem
Fixed #34909.
In the Admin home page that lists your apps and their models (see screenshot below), there is an
Add
and aChange
button for each model. All these buttons had the same accessible name,"Add"
and"Change"
respectively. This could be confusing for users using screen readers, since all the buttons would be called the same. It's better if the screen reader reads out something like"Add <model-name>"
instead of just"Add"
, so that it's clearer for the user what they're adding or changing. See accessible naming guidelines for more information on this topic.Alternative option
Adding something like
aria-label="Add <model-name>"
to the buttons would fix the issue for screen reader users, but could impact the experience of voice control users. An example of this is that a user could use voice control saying something like "Click Add", but because theAdd
button now has a "hidden" name that's different (Add <model-name>
), the voice control might not recognize this button when the user says "Click Add". This kind of issue is explained in more detail in this post about voice control usability considerations.Implemented solution
The implemented fix was to use
aria-describedby
with a reference to the model name, so that screen reader users can hear something like "Add" followed by the model name after a brief pause, while the accessible name of the button remainsAdd
and voice control users are not affected. This fix was tested using both the Mac VoiceOver utility and the Mac Voice Control utility (both in Ventura 13.4).The Admin screens that were updated are the following:

