#33060 closed defect (bug) (fixed)
Screen readers: moving focus and animations (the Publish box)
Reported by: | afercia | Owned by: | iseulde |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | accessibility, javascript | Cc: |
Description
Noticed for the first time during Press This development in the 4.2 release cycle and reproduced in other places too, for example in the Customizer, in the Media Views and in the Post Publish box.
Will use the Publish box as an example, since it's easier to understand, and as scope of this ticket.
Testing with Firefox + NVDA, here's what happens when clicking the Edit link to change the post publish date: since focus is moved during the animation NVDA gets lost for some milliseconds and starts reading out the document from the start, announcing the document title multiple times, together with a very explanatory "unknown". A lot of noise for users :)
In the screenshot below, in the NVDA speech viewer the first highlighted box is when focus is on the "Edit" link. After activating the link, all that stuff gets read out until NVDA finally understand focus is on a new element (the second highlighted box).
With just a small change, moving the focus when the animation is complete makes a huge difference, see screenshot below:
While browsers move focus immediately, turns out screen readers may not understand an element is getting visible until the animation is complete.
Will submit a patch for the Publish box. I'd also strongly recommend to take into consideration this for all future developments: sliding panels, highly animated interfaces, Media Views getting updated, etc. they all should try to detect when animations or UI updates are complete and just then move the focus, when needed.
Please notice the proposed patch here assumes patch https://core.trac.wordpress.org/attachment/ticket/33059/33059.2.patch to be already in.
The patch does two things:
Many other things should be done for accessibility here, but they're out of the scope of this ticket, for example: