[wp-trac] [WordPress Trac] #33029: Dismissable admin notices focus loss
WordPress Trac
noreply at wordpress.org
Mon Jul 27 12:15:50 UTC 2015
#33029: Dismissable admin notices focus loss
-------------------------------------+-------------------------------------
Reporter: afercia | Owner: morganestes
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 4.2
Severity: normal | Resolution:
Keywords: 2nd-opinion dev- | Focuses: ui, accessibility,
feedback has-patch | javascript
-------------------------------------+-------------------------------------
Comment (by adamsilverstein):
Interesting - I will test in Firefox!
Thinking we could achieve something similar by leaving a (possible
collapsed/empty) element in place, replacing the dismissed element, and
keeping the focus there. This would give chrome the behavior you describe
firefox having and would likely be a more re-usable pattern.
Replying to [comment:5 afercia]:
> I'm not sure we can rely on the mousedown event. When an assistive
technology (i.e. screen readers) is enabled, it does its things with
events and doesn't deliver them the same way as browsers do. Sometimes
screen readers don't deliver a `keydown` or `mousedown` event at all, see
for example this article:
> http://unobfuscated.blogspot.it/2013/05/event-handlers-and-screen-
readers.html
> Though the article focuses on anchor elements, it mentions also buttons.
I've struggled a bit looking for other references about screen readers and
events, without any luck for now.
>
>
> Ideally, maybe the best option would be what Firefox does. If you
compare Firefox and Chrome behaviors, you will see that after you dismiss
the notice and tab (or tab backwards) Firefox will give focus to the next
(or previous) focusable element. I love Firefox for this kind of things :)
Chrome will move focus to the document root instead.
> I'd be interested in understanding how Firefox handle this. It looks
like it keeps a sort of focusable elements internal index.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33029#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list