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

Cannot edit existing link in URLInput #3350

Closed
afercia opened this issue Nov 6, 2017 · 5 comments · Fixed by #10983
Closed

Cannot edit existing link in URLInput #3350

afercia opened this issue Nov 6, 2017 · 5 comments · Fixed by #10983
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Testing Needs further testing to be confirmed.

Comments

@afercia
Copy link
Contributor

afercia commented Nov 6, 2017

When inserting a link or a "@" username mention, clicking on a link or moving the caret on a link makes an inline "popup" appear. The popup contains controls to edit the link, remove the link, additional settings (e.g. open in a new window):

screen shot 2017-11-06 at 15 23 54

Although the popup is "inline" and it is possible to press Tab and move focus to it, there are a few missing features compared to the similar link inline toolbar in the Classic Editor:

  • Alt+F8 should move focus to the popup
  • Escape should move focus back from the popup to the link, to the previous caret position or selection
  • pressing Tab and arrow keys should loop through the popup controls
  • tabbing should be constrained within the popup

Also, to match the current functionality in the Classic Editor, Cmd/Ctrl + K should switch the popup to edit mode. Currently, it is only possible to click the two edit buttons, with different results:

screen shot 2017-11-06 at 16 05 50

  • clicking the Edit button within the modal, will switch to edit mode populating the input field with the current link URL
  • clicking the Edit button in the top fixed toolbar, will switch to edit mode but the input field is empty

Also, when editing an username "mention", what should happen? Should the popup appear in edit mode and give users the ability to manually edit the link to the user page or present again the list of username suggestions?

Current behavior:

screen shot 2017-11-06 at 16 09 51

@afercia afercia added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Nov 6, 2017
@JeroenSormani
Copy link

It may be an new issue / working before, but I believe also a accessibility case would be that the word that was selected to be linked is no longer highlighted;
image
The 'Hello' word is selected here to be linked.
(The positioning error is reported at #6183)

@afercia
Copy link
Contributor Author

afercia commented Jul 9, 2018

Some time has passed since Nov 6 2017, when this issue was created and some things have changed. for example, mentions don't insert a link any longer.

However, it would be greatly beneficial to review again all the "insert link" popups, check the interaction consistency, and the points mentioned above.

@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Jul 27, 2018
@designsimply
Copy link
Member

Agree about needing to re-check the interaction consistency. Added a Needs Testing label for that purpose.

Note: a separate issue has been filed at #6156 for the issue @JeroenSormani mentioned where the link text does not appear to be selected when you are adding a link.

@afercia
Copy link
Contributor Author

afercia commented Aug 5, 2018

Many components use now a standardised URLInput component, for example in the paragraph block. Here's how it looks like:

screen shot 2018-07-29 at 18 17 58

Pressing the ellipsis button gives access to the "open in a new window" option. The biggest issue with the current implementation (it uses a "popover") is that it's impossible to edit an existing link using only the keyboard. See #8266

Some of the most evident inconsistencies with other components:

The Button component uses a custom implementation of the URL input field and it misses the option "open in a new window". Also, the design is different:

screen shot 2018-07-29 at 18 24 58

The Verse block is the only block with an editable area that doesn't have a link button. This is intentional, see bd676b5#r126746200 and while I can understand the reasoning it seems to me a limitation:

screen shot 2018-07-29 at 19 03 24

Well, to be honest, I'm not sure about the whole purpose of the Verse block but this is another issue.

Related issues: #8265 and #1838

@tofumatt tofumatt changed the title Improve keyboard navigation for the "link modal" popups Cannot edit existing link in URLInput Oct 5, 2018
@aaronjorbin aaronjorbin added this to the Merge: Accessibility milestone Oct 7, 2018
@tofumatt
Copy link
Member

This will be fixed by #10983. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Testing Needs further testing to be confirmed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants