Make WordPress Core

Opened 6 months ago

Last modified 8 weeks ago

#60369 assigned enhancement

Shortcut for Select Button in Media Library

Reported by: hirschferkel's profile hirschferkel Owned by: antpb's profile antpb
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch 2nd-opinion
Focuses: accessibility Cc:

Description

Hi there,

there should be a shortcut to confirm the selected image in Media Library? It is possible to choose an image with Return Shortcut but there is no combination (and documentation) to just confirm the selection with keypad and insert it to the page …

Dealing with lots of images is currently really cucumbersome, as one has to click the button manually each time again and again.
https://pasteboard.co/sX5B35Ns3tM7.jpg

Attachments (3)

60369.patch (1.8 KB) - added by antpb 5 months ago.
60369-2.patch (1.8 KB) - added by antpb 2 months ago.
fixes Classic Editor media select views
60369.3.patch (1.8 KB) - added by joedolson 2 months ago.
Strip excess whitespace

Download all attachments as: .zip

Change History (23)

#1 @poena
6 months ago

  • Severity changed from major to normal

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


5 months ago

#3 @antpb
5 months ago

  • Milestone changed from Awaiting Review to 6.6
  • Owner set to antpb
  • Status changed from new to assigned

Noting this was discussed in the Media Component meeting and we agree this currently is a sore spot. We are thinking cmd/ctrl + enter is the right combo to do this. Adding to 6.6 to see if we can find a quick and solid solution.

#4 follow-up: @hirschferkel
5 months ago

Great to read!

@antpb
5 months ago

#5 @hirschferkel
5 months ago

@antpb is it possible to apply this patch already in the current WordPress release?

#6 @joedolson
5 months ago

Seems to work well; did a brief screen reader test in NVDA/Firefox and NVDA/Chrome to verify it works with a screen reader, and the shortcut fires there.

I did notice that the keyboard shortcut doesn't work in the classic editor - it closes the modal, but doesn't insert the image.

#7 in reply to: ↑ 4 @skobe
4 months ago

Replying to hirschferkel:

Great to read!

Great to read indeed! Thanks for pushing this!

@antpb
2 months ago

fixes Classic Editor media select views

#8 @antpb
2 months ago

  • Keywords has-patch added

Thanks for the testing on this @joedolson nice catch. I've uploaded a new patch that addresses the issue with the Classic Editor views. Everything should insert correctly now!

#9 @joedolson
2 months ago

  • Keywords commit added

Tested and confirmed working on classic editor now & also still working with a screen reader running. Updated patch just removes some white space at the end of a line.

@joedolson
2 months ago

Strip excess whitespace

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


2 months ago

#11 @rcreators
2 months ago

Tested with the Latest WordPress. Works Great. Using CTRL + Enter let me select multiple media. Not sure how but SHIFT + Enter also works like selecting an entire row which is not mentioned in the uploaded patch.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


2 months ago

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.


2 months ago

#14 @rcreators
2 months ago

  • Keywords 2nd-opinion added; commit removed

@joedolson I tested this patch again and i think its creating another issue. The CTRl + ENTER works great to add image to the page. But now i cannot select multiple images with the keyboard which i was able to do without applying this patch.

The default behaviour of selecting image was:
1) Enter: Select Particular Image
2) Ctrl + Enter: Select multiple images
3) Shift + Enter: Select multiple images in a sequence

Now as patch changing the second behaviour, i cannot select multiple image with ctrl + Enter and it will create confusion for regular users who are using this method.

#15 @joedolson
2 months ago

@rcreators Where are you able to select multiple images? What happens when you try to insert those images? What browser are you using and what is the path to get to the inserter?

I can't replicate the issue you're describing - I am not able to select multiple images with or without the patch. But I don't have enough information to be able to do a comparable test.

#16 @oglekler
8 weeks ago

  • Milestone changed from 6.6 to 6.7

We have 2 days before Beta 1, so I am moving it into the next milestone for further work.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


8 weeks ago

#18 @rcreators
8 weeks ago

Hello @joedolson Here is link of video what i am saying.

https://go.screenpal.com/watch/cZ1eiBVNQRW

To understand issue, follow this steps.

1) Latest WordPress with classic editor
2) Go to edit page and add media
3) On media dialogue try to select multiple images with ctrl + enter - It works
4) Apply your patch - try to select multiple images with ctrl + enter - doesn't work.

Please try and let me know if needed more details.

#19 @joedolson
8 weeks ago

Thanks, @rcreators! So, the important piece of information is that it's a classic-editor specific issue. Knowing that, I was able to reproduce this.

It doesn't have any impact on the block editor, because the block editor doesn't have the ability to insert multiple images at once. I don't know how widely used this feature might be, but it's safe to say that anybody who has a need to insert multiple images that aren't in a gallery will still be using the classic editor to do that, and we probably need to continue to support it - otherwise it's a breaking change that could have a significant impact on some workflows.

In the block editor, it's fine. We could isolate this enhancement to only apply in the block editor - that way we don't introduce a conflict in the classic editor. I think it's OK if we aren't introducing enhancements into the classic editor; anybody who's using it is presumably not expecting changes.

@antpb - thoughts?

#20 @rcreators
8 weeks ago

Hello @joedolson, yes. This is classic editor issue. If you add some code to neglect this functionality for classic editor that works. But I recommend we find another key combination as it's good to have similar key combination for both editor. Mostly people who are using classic editor will use Gutenberg in future. Having using same key combination for classic and Gutenberg will help them to work smoothly in future.

Note: See TracTickets for help on using tickets.