In this specific instance – it’s particularly problematic that they are
taken to an element that’s not the first interactive element within the
main content. The model’s "Add" button is above the search field, and
would be very hard to find for a screen reader user taken straight to the
search.
My recommendation would be to remove usage of autofocus for search fields
like this.
--
Ticket URL: <https://code.djangoproject.com/ticket/34040>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
Makes sense to me (and as you point out, this is not a page composed of a
single action only). An additional data point: the eslint plugin `jsx-
a11y` has a `no-autofocus` rule.
--
Ticket URL: <https://code.djangoproject.com/ticket/34040#comment:1>
* owner: nobody => moshe nahmias
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34040#comment:2>
* has_patch: 0 => 1
* stage: Accepted => Ready for checkin
Comment:
[https://github.com/django/django/pull/16114 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/34040#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d938b3b2577807ffd585f654caa0f37d9574e565" d938b3b]:
{{{
#!CommitTicketReference repository=""
revision="d938b3b2577807ffd585f654caa0f37d9574e565"
Fixed #34040 -- Removed autofocus from admin search box.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34040#comment:4>