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

Try to make link UI in the button block consistent with other link interfaces #16495

Closed
talldan opened this issue Jul 10, 2019 · 3 comments
Closed
Labels
[Block] Buttons Affects the Buttons Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.

Comments

@talldan
Copy link
Contributor

talldan commented Jul 10, 2019

See also #2216, #6392

Description
#10128 involved quite a bit of iteration on the link UI in the button block, which was perhaps out of scope for the related issue. Eventually, a simplified design was settled on in order to move the PR forwards, but there's was acknowledgement that we're still left with inconsistencies across link user interfaces in Gutenberg.

This issue summarises some of the explorations on that PR and captures that further exploration may be required.

Attempted in #10128:

Using the link popover in the button block (#10128)

pull-8000

For:

  • Brings consistency across link interfaces

Against:

  • This approach was very hard to make accessible. Since the link input field is in a popover it wasn't possible to tab from the button text to the link input and back again.

Using a button to open the link popover (#10128 (comment))

button-link

For:

  • Is still consistent with other link interfaces
  • Solves some accessibility problems inherent other solutions

Against:

  • It's a bit weird, a confusing extra step that users have to take

Other info:

  • It was suggested that the button could be a toolbar button, though I think this hides an essential piece of functionality for the button block.

An inline version of the link popover (#10128 (comment))

inline-link

For:

  • Is still consistent with other link interfaces
  • Solves some accessibility problems inherent other solutions

Against:

  • It's visually busy

Other info:

A simplified version of the link UI (screen capture is similar to what was implemented)

8000

For:

  • Visually clean
  • Solves some accessibility problems inherent other solutions

Against:

  • Still inconsistent with other link user interfaces.
@talldan talldan added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Block] Buttons Affects the Buttons Block labels Jul 10, 2019
@talldan talldan changed the title Try to make link UI in the button block more consistent with other link interfaces Try to make link UI in the button block consistent with other link interfaces Jul 10, 2019
@talldan talldan added the Needs Design Needs design efforts. label Jul 10, 2019
@afercia
Copy link
Contributor

afercia commented Jul 10, 2019

Seems to me one of the inconsistencies (and an actual problem for accessibility) is that when a link suggestion is highlighted, tabbing away from the input field sets the link.

This is a problem because the Tab key must be reserved for keyboard navigation. Triggering an action (setting the link) while users just want to navigate away would be completely unexpected.

@talldan
Copy link
Contributor Author

talldan commented Jul 10, 2019

Yep, though just to clarify, the link is updated on every keypress not when the input blurs. That's not something new, but the way the button block worked before #10128 as well.

Introducing a submit/apply button would make it more consistent and probably help in the implementation of #16494 as well. Could even be done as part of fixing that issue.

@talldan
Copy link
Contributor Author

talldan commented Feb 11, 2020

Closing as the link UI has recently been updated.

@talldan talldan closed this as completed Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants