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

Add accessible notice for "no results" in the Link Control #50992

Open
getdave opened this issue May 26, 2023 · 0 comments
Open

Add accessible notice for "no results" in the Link Control #50992

getdave opened this issue May 26, 2023 · 0 comments
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.

Comments

@getdave
Copy link
Contributor

getdave commented May 26, 2023

          Good stuff! 

I 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.

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.

Love 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?

Discards current changes and closes the popover; does not remove the link.

The 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.

Yes, 100%.

Selecting a value for the link, also changes the title of the link.

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.

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.

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.

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.

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.

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.

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).

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.

The URL input works like this today; where if you start typing, you get results suggested for you.

Originally posted by @richtabor in #50950 (comment)

@getdave getdave added the [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) label May 26, 2023
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants