[wp-trac] [WordPress Trac] #33029: Dismissable admin notices focus loss

WordPress Trac noreply at wordpress.org
Sun Jul 26 14:00:33 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 needs-patch               |  javascript
-------------------------------------+-------------------------------------
Changes (by adamsilverstein):

 * keywords:  2nd-opinion dev-feedback has-patch => 2nd-opinion dev-feedback
     needs-patch
 * owner:   => morganestes
 * status:  new => reviewing


Comment:

 @McGuive7: Thanks for the patch. Tested and this works well ''if I click
 the dismiss notice''.

 While this seems useful in itself, I don't think it resolves the issue
 raised in the ticket. Using only the keyboard to navigate to the dismiss
 button, the patch doesn't change the focus behaviour when closing the
 dismissable notice.

 Reading thru the [https://www.marcozehe.de/2015/02/05/advanced-aria-tip-2
 -accessible-modal-dialogs/ linked document] above, the most relevant bit
 is to ''set focus back to the element that opened the dialog, '' '''or any
 other useful element from which the user of your app will most likely
 continue working''' (emphasis added).

 After actioning 'Update' the page refreshes and I am back at the root
 element. Tabbing back to the dismissable notice, the focus immediately
 before the dismiss button is the 'View' link which is part of the
 dismissable notice. Therefore, I think we need to take the approach of
 focusing back to where the user is likely to continue working - I propose
 we refocus on the content editor or possibly the title field. I'd still
 like to keep the click catch return to previous focus in the patch,
 otherwise we'll wind up tacking focus after click to a possibly different
 location.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33029#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list