Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Library 'featured image' dialogue missing link text that describes 'opens in new tab'. #17642

Closed
anthonyburchell opened this issue Sep 30, 2019 · 2 comments · Fixed by #17641
Labels
[Feature] Media Anything that impacts the experience of managing media [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Milestone

Comments

@anthonyburchell
Copy link
Contributor

Describe the bug
This was originally reported in https://core.trac.wordpress.org/ticket/48028

This github issue is being created because the bug was introduced via Gutenberg and will need to happen here to resolve the overall Accessibility bug.

Description from Trac Report:

The "Media Library" panel of the "Featured Image" modal dialog contains a link labelled with "Edit image". This link takes users to a new window/tab, but that link does not inform users that it opens a new window or tab.
A link does not naturally convey itself to assistive technology that it opens in a new tab without link text that describes it.
It is important to convey that a link opens in a new tab because of the change of context may not be clear to everyone.
Suggested solution
Write more descriptive link text that describes the link opening in a new tab;
Utilise the class of 'screen-reader-text' in CSS to hide that text (you can wrap the text in ).
Example of solution

Edit Image
(Opens in a new window)

This problem was originally raised on ticket #47137 and has been separated out here to reduce complexity.

To reproduce
Steps to reproduce the behavior:

  1. Add an image block
  2. Click on 'media library'
  3. Select image
  4. Click "Edit Image" in the sidebar
    After 4 you will see this opens in a new tab. This is due to the fact that the required edit state logic is not currently in the MediaUpload component.

Expected behavior
Instead of opening in a new tab, the link should just open the Edit Image state within the same modal.

Screenshots
Screen Shot 2019-09-29 at 4 35 55 PM

@anthonyburchell
Copy link
Contributor Author

PR to resolve this is here: #17641

@anthonyburchell
Copy link
Contributor Author

anthonyburchell commented Sep 30, 2019

Additionally, the PR above addresses another issue that needed to be fixed in order for the edit image fix to work. Currently we use return wp.media.view.MediaFrame.Post.extend( { for the gallery views of the media library. We should instead be using return wp.media.view.MediaFrame.Select.extend( {

@antpb antpb added [Feature] Media Anything that impacts the experience of managing media [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Sep 30, 2019
@antpb antpb added this to the WordPress 5.x milestone Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants