-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
BorderBoxControl: Add Tooltips around split border controls #42661
Conversation
@ciampo or @mirka do you have any suggestions or ideas on the best course of action to address the issue noted in the PR description relating to concurrent tooltips?
|
This is an interesting one! If we need an quick solution, since we recently assessed that
More in general, this looks a bit like the problem we're facing with labelling nested groups of inputs, discussed in #42630. And similarly to the conversation in #42630, I believe that we could come up with a way display a |
Thanks for the quick feedback @ciampo 🙇
Agreed, this appears to be the way to go longer term. I was hoping to try and improve the
This also seems like a quick win however I wasn't sure how we'd evaluate the tradeoff between prioritising the Do you think there is more to gain by removing the tooltip from the color/style picker button in favour of tooltips on the split border controls? |
Good point — the tooltip on the color/style picker button seems to be a useful enhancement, and it would a pity to remove it. I think that we may be focusing on the wrong issue here: if we require so many tooltips for For example, couldn't we display some label text above each |
Taking the primary use case in our editors, if we had access to the merged global styles values in the block editor, we'd be able to set a meaningful and accurate color to the control by default. I think this would help improve how intuitive the control is. This issue of the nested Tooltips has only come about due to me recently moving the border color/style dropdown into a
I believe one of the original goals for the There is some ongoing work around adding UI to the spacing presets in the editor. It is based off the Personally, I don't find this as aesthetically pleasing as the border control with the visualizer. |
Maybe, but it wouldn't really impact the UX of the
I'm not sure how moving the border color/style button back to being a sibling of
I agree with you 💯 % with respect to what approach is the most aesthetically pleasing. What I'm trying to say is that, in case we can't figure out a good approach to improving the accessibility (or if the approach is very hard / convoluted), it may be a symptom that we may need to partially reconsider the way this component is structured. In general, I believe that it's much harder to retro-fit accessibility into a beautiful design, than it is to improve the design of an accessible control. |
My thinking here was that we could offer better tooltips via the |
Just to make sure I understand correctly what you're proposing — for example, the bottom border's
Is that what you had in mind? |
Yes, I believe it's one option we can consider at least. |
I don't know what our ultimate labeling strategy is going to be in the long-term, but in the short-term, out of the possible options, I think we can go with number 3. It's simple, and it will be useful for any other InputControl-based component having an interactive prefix/suffix. |
I've drafted a PR adding the ability to wrap the inner When in the split view, we wish to indicate each It's been raised that concatenating translated strings would yield poor results, so combining the border side with the width Would allowing customised tooltip text help? How would we ensure it's useful for speech recognition software users etc.? |
Thank you for opening #42726! I left my replies directly in the PR |
With the PR adding support for If this still the main option that we're considering?
|
Closing this old PR. If we come back to this or a similar approach it can be reopened. |
Related:
What?
Add basic tooltips around each individual side's border control within the
BorderBoxControl
Why?
Assists speech recognition software users in identifying the names of individual border fields. See: #42095 (comment)
How?
BoxControl
andBorderRadiusControl
componentsTooltip
with an innerdiv
wrapper.Known Issues
The recent addition of a Tooltip to the border color and style picker button means when it is hovered two Tooltips are displayed at once.
Possible options
UnitControl
prefix. This means we could wrap theUnitControl
with a tooltip independently to the dropdown.InputControl
to support optionally wrapping itsInputField
with a tooltip.Testing Instructions
BorderBoxControl
page.BorderBoxControl
functions the same as on trunk despite the tooltips.Screenshots or screencast
Screen.Recording.2022-07-25.at.3.13.08.pm.mp4