Make WordPress Core

Opened 7 years ago

Closed 3 years ago

#43202 closed defect (bug) (fixed)

Attachment Details: with cursor in URL box, left/right arrows switch between attachments

Reported by: jrivett's profile jrivett Owned by: joedolson's profile joedolson
Milestone: 6.0 Priority: normal
Severity: normal Version: 4.9.2
Component: Media Keywords: has-patch commit
Focuses: ui, accessibility, javascript Cc:

Description

This is related to issue #29725 (https://core.trac.wordpress.org/ticket/29725). The changes made to resolve #29725 work for text boxes that can be edited, but the URL box is read-only, and because of that, the fix has no effect.

On the Attachment Details screen, an attachment's URL is only shown in the URL box. But typically, most of the URL is not shown, since it's longer than the box size. To see the end of the URL, I can use the End key, but that leaves the middle of the URL, which for many URLs I can only see if I can move the cursor with the left/right arrow keys.

You could make the URL box completely inaccessible (disable the cursor completely), but then the box would be essentially useless as a source of information. That seems to leave only one remaining choice, which is to disable attachment navigation using the left/right arrow keys when the cursor is in the URL box.

Attachments (1)

43202.diff (634 bytes) - added by afercia 3 years ago.

Download all attachments as: .zip

Change History (7)

#1 @joemcgill
6 years ago

  • Focuses ui accessibility javascript added
  • Keywords attachment media arrow keys navigation removed
  • Milestone changed from Awaiting Review to Future Release

I can confirm that this is still a bug in trunk during the 5.2 beta cycle.

Steps to reproduce:

  1. Visit: /wp-admin/upload.php?mode=grid
  2. Click on a thumbnail to open the attachment details
  3. Place your cursor on the URL field
  4. Press the left or right keyboard arrow
  5. Observe that the active media item changes

#3 @joedolson
3 years ago

  • Milestone changed from Future Release to 6.0
  • Owner set to joedolson
  • Status changed from new to accepted

@afercia
3 years ago

#4 @afercia
3 years ago

  • Keywords has-patch added

43202.diff prevents left/right arrow keys navigation from happening when readonly inputs are focused. To test:

  • apply the patch and build
  • repeat the steps from comment:1
  • observe navigation through the attachments doesn't happen

#5 @joedolson
3 years ago

  • Keywords commit added

Tested - patch works as expected. Marking for commit.

Hi, Andrea! Good to see you around.

#6 @joedolson
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 52792:

Media: Stop arrow keys switching media if URL focused.

Keyboard handlers were prevented from navigating attachments in input fields, but the key handler excluded readonly fields, like the media URL field. This could prevent exploring the URL using the keyboard.

Props jrivett, joemcgill, afercia.
Fixes #43202.

Note: See TracTickets for help on using tickets.