-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
A11y review of Link Control/UI design refresh #50950
Comments
@jeryj Could we draw on your expertise here? Once we've done a first pass I think it would be a great idea if you could take this to the Core a11y team chat and ask them for input on specific questions. Everyone is of course more than welcome to participate upfront, but I"m conscious that the team are across many efforts and so anything we can do to streamline the effort required by them will help. Thank you 🙇 |
Thanks for flagging this early, @getdave! And thanks for all your efforts on improving the Link UI, @richtabor! I have some recommendations, but nothing that I think will be major. Most of the things, I hope, will make things more accessible and simpler for everyone 🤞🏻 No Results FoundI think having a message that says, "no results found," or simiilar would be helpful here. Otherwise it's unclear if the search failed, is still loading, etc. Cancelling after Page SelectionLove the labelled inputs here! In this state, does the cancel remove the link entirely (cancelling the whole link insertion) or does cancelling only remove changes you've made to the link and text inputs? If it's the latter, maybe the cancel button should also be disabled so it's clearer that it doesn't remove the link? Also, does clicking the link close the dialog along with it? I'm not sure how this interaction should work. I'll ask those more knowledgeable :) Same input labelling and order in Post Link Inspector PanelThe post link block inspector lists the inputs in a different order with different labels. For consistency, I think the inputs in the Link UI and the Block Inspector should be labelled the same and have the same order. Hide or Remove Open in a New TabI know that opening links in a new tab is a common pattern used on websites, but opening links in a new tab is almost Flow when Editing Link TextI think this interaction will be hard to communicate to all users for a few reasons:
This feature is essentially starting over on the page selection without deleting the link and trying again. In the current Link UI, clicking the "unlink" icon at the top right has this behavior already. I think that a separate button that allows you to arrive at this "starting over," state is enough and more preferable than combining the URL input to have impact beyond editing the URL. Also, it's a win for simplicity and shipping sooner since that button is already in the UI 😉 Always have Add Link Button if the Search is URL-formattedIn the flow, the Add Link button is only present when there are no search results. I think anytime the text in the search field is formatted like a URL that the Add Link option should be visible. Also, I think it should be within the results and not in the section afterwards, as it is a dynamic value returned as a result of what they type in the search field. It will likely help with accessibility to have the value returned within the list of search results since its value is connected to that field. Link settings button should be adjacent to the fields it revealsThe button to open the additional link settings should be adjacent visually and HTML-wise to the fields that it reveals. So, if the additional fields open at the bottom of the Link UI pane, the Link Settings button should also be at the bottom of the pane. This greatly aids in managing focus and having an expected focus order. For example, if the button to reveal the settings is at the top and the additional fields are at the bottom, it will take several tab presses to reach the settings it opened and several back to close it again. Also, by having them next to each other, it's clearer what the relationship is between the button and its settings based on proximity. Labelling Search Input for Specific CasesI was going back and forth on recommending a visible label for the search ui input. The reason I didn't press it was that really anything you search in the default version will return something and it could be formatted like a URL or plain text, etc. So there's not a specific instruction to really recommend. However, in these cases, it looks like the search is restricted to a specific case, such as Tags, Category, or Post titles. When the search input is restricted to a specific case, we should have a visible label that indicates as such. Having it in the placeholder isn't enough, as it will disappear as soon as the input is focused (which is likely programmatically done immediately when the link ui is opened, meaning it's unlikely anyone will even see the placeholder text). |
Thank you so much @jeryj 🙇♂️ cc @richtabor on the above. |
There a PR yet? |
Good stuff!
There would still be "Add block" or "Add new page/link: {query}" as the primary suggestions/results. I do want to keep the current heading as visually hidden (#50977) but I suppose we could also add a condition for if there are no results as well.
Discards current changes and closes the popover; does not remove the link.
Yes, 100%.
I'd argue that the expectation of picking a new suggestion would populate all properties of the suggestion (link and text). But I do recognize that we do not have this logic in place today.
I lean towards having it in a footer area so that it doesn't present like a result. It should be clear that there is not an existing result.
Yes, I share this concern. It could be fine to have "Add new tab" placed after "Link". But that does introduce another oddity if we add additional controls for say Link Rel and Class. The Settings icon would open the drawer of all those additional controls.
Search is not restricted to specific cases except for these block variations. I think the type indicated on each result is indicative of the items that are suggested (for both cases).
The URL input works like this today; where if you start typing, you get results suggested for you. |
@alexstine - No, this is just the design of what we would implement. Trying to do it right and get an accessibility review from the mockups first to catch anything that would clearly be an accessibility issue. |
Once there is a PR, I can help. For now, you need someone with sight. CC @afercia @joedolson . |
I would never expect changing a link target to change the title of the link, and I think that could become quite irritating. From a writing flow perspective, my process is generally to write, then add links after having written. So I've already written my link text, which will usually be within a sentence structure. If selecting a link target imposed the title of that item on my text, I'd almost always need to then edit the text back to before. I have trouble imagining a scenario where I would expect changing a link to also change the written text. I agree with @jeryj that the positioning of the settings button needs to be in proximity to the controls it opens. As regards removing the 'open in new tab' option, I think that's a very difficult problem. It is a legitimate choice, and does have relevant applications, so not providing a mechanism to do that can create other, more severe accessibility problems (loss of data without warning.) Opening links in new tabs is not, technically, the accessibility problem; it's doing so without providing warning to the user. Ideally, WordPress would take control of appending an accessible notification that a link opens in a new tab so that users were informed of this, rather than simply removing the option. |
I think there’s some confusion. This proposal is suggesting that when you search and pick a result, it is added to the link. Perhaps another area of confusion is how Navigation Links and inline links could act differently. If I search for and add a link to my navigation, I surely want to whole entity applied. |
I'm not clear what that means. Do you mean only if you are searching without text already selected? I could see a logic that it adds the text at any time that the context doesn't already have text. E.g., when editing posts, you select text then add a link; in that case, it does not change anything; when adding a link to a navigation menu, there is no existing text node, so it inserts the text as default. |
Thank you for the in-depth exploration. I'd agree with most of what @jeryj and @joedolson said. Can we please try to describe the three flows in plain text rather than by using the mockups from the issue at #50891 ? I'd love this to be accessible for everyone. Please do feel free to edit the description below to integrate or correct where necessary. Inline link
Navigation link
Image link
|
Feature request: glad to move this to a separate issue, if desired. Image linkWhen linking an image, the image alt text determines the accessible name of the link (the link 'text'). It would be great to make the Link UI provide the ability to edit the image alt text. This would also be a good opportunity to educate users and inform them they need to provide a meaningful alt text that described the link purpose. To clarify, the following markup would not be appropriate, because the alt text describes the image. The link purpose / destination is unclear:
A more meaningful and accessible markup would describe the link purpose / destination in the image alt text:
The image alt text should be editable both when inserting an image link for the first time and when editing an existing image link. A short description below the alt text input field may help users understand that in this context the image alt text is, actually, the link 'text'. |
You can either use the "Cancel" button (same as today) or press ESC (also works today). |
That's interesting. It would be nice to auto-set the Image block's alt text if "Link to attachment page", or Link to image file" options were selected. Would be a nice follow-up to explore. |
I appreciate all the input team — good stuff. Here's an iteration based on the above: Notable changes:
|
I much prefer the link settings in the position they are shown in this mockup (i.e. below the fields). This is what they currently do on |
I like the flow you're recommending - bring up the edit controls from the beginning. |
These are all great to me! Thanks so much for taking the time to solicit feedback, listen, and thoughtfully implement it ❤ |
Since the review is complete I'm going to close this. |
I believe @richtabor has updated the designs in the main Issue to reflect the results here. |
With a new UX/Design for the Link interface being proposed in #50891, let's:
Part of #50891.
The text was updated successfully, but these errors were encountered: