Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#29303 closed defect (bug) (fixed)

Reverse tabbing from the attachment details sidebar should return you to the selected attachment

Reported by: helen's profile helen Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: has-patch dev-feedback
Focuses: accessibility, javascript Cc:

Description

We had fixed this at some point in #23560, but it appears to be broken again and takes you out of the modal to the underlying page.

Attachments (2)

29303.diff (548 bytes) - added by adamsilverstein 11 years ago.
add tabindex="1" to attachment-details div allow reverse tabbing out of media detail div
29303.2.diff (552 bytes) - added by adamsilverstein 11 years ago.
focus on (first) selected item when tabbing back from Edit Image

Download all attachments as: .zip

Change History (8)

#1 @helen
11 years ago

  • Milestone changed from Awaiting Review to 4.0
  • Version set to trunk

@adamsilverstein
11 years ago

add tabindex="1" to attachment-details div allow reverse tabbing out of media detail div

#2 @adamsilverstein
11 years ago

In 29303.diff:

  • Add a tabindex of 1 to attachment-details div, allows reverse tabbing from the media details area back to the media grid (in post->add media modal).

Note: I'm still uncertain why the reverse tabbing fails without this. reviewing jQuery( ':tabbable') I see all the elements in the proper order. Turned off JavaScript to ensure we weren't refocusing in code... somehow the browsers are confused about our tab order. tried messing with tabindex values for li's, container ul, etc. Solution I arrived at does have one hidden tab step when going backwards (the attachment-details div), happy to see a better fix if possible - anyone with better tab analysis skills please chime in!

Also: note that this does not put the focus back on the selected attachment; going to try again with JavaScript to see if I can get that working.

@adamsilverstein
11 years ago

focus on (first) selected item when tabbing back from Edit Image

#3 @adamsilverstein
11 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

In 29303.2.diff

  • Focus on the (first) selected media item when shift tabbing from the Edit Image link

Note: Ignore the previous patch, this one does a much better job - actually putting the focus back on the selected item. Hope the DOM selector is specific enough here, maybe could be triggering controller to re-focus?

#4 @wonderboymusic
11 years ago

The problem remains, subviews should not reach out into other views - it would be better to trigger an event that the controller listens to

#5 follow-up: @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 29584:

Media Grid: restore focus to the selected item when shift-tab away from the attachment details sidebar.

Fixes #29303.

#6 in reply to: ↑ 5 @adamsilverstein
11 years ago

Nice work! This is a better approach, was thinking along those lines until I ran out of steam.

At least I identified the proper change point! I really wasn't sure if focus action belonged in view or controller, failed to notice it was a subview; Doh!

Thank you sir!

Replying to wonderboymusic:

In 29584:

Media Grid: restore focus to the selected item when shift-tab away from the attachment details sidebar.

Fixes #29303.

Note: See TracTickets for help on using tickets.