LinkControl: Provide better way to see the full URLs #61158
Labels
[Feature] Link Editing
Link components (LinkControl, URLInput) and integrations (RichText link formatting)
[Package] Block editor
/packages/block-editor
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
Splitting this out from #60901 and #60908
As mentioned in the linked issue and PR, using the 'Copy link' button tooltip to display the full URL of the link is a no-go for accessibility and, I would say, also for usability.
Important
Please do not ever use values or states for a control's tooltip. A control's tooltip is meant to visually expose the control's name provided by its
aria-label
. A label must be used to communicate what the control does. It's not the place for values or states.By using extraneous content for the aria-label and tooltip:
I'd add that also visually, a very long URL displayed within a tooltip isn't a great user experience. A couple example screenshots:
Proposal
Displaying of long URLs is not a new problem in WordPress. It has been discussed across the year and addressed, for example, for the Permalink editing UI in the Classic editor.
As suggested in #60908 (comment) I'd like to propose to use the same displaying mechanism used in the Classic Permalink editing UI.
Screenshots to illustrate what Classic Editor does to display long URLs in the link 'preview':
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: