[Button] Improve icon-only button #2726
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature Request
Current Behavior :
In button component with svg only content, on mousehover there are no way to get a visible label.
It's ok for known icons like the "burger menu" or the "magnifying glass", but it can be difficult for little-recognized icons.
It's also ok for people using screen reader because an aria-label attribute can be specified on the element.
Expected behavior/code :
To get a visible indication on hover (like the browser hover tooltip) for icon only button.
Environment
Possible Solution :
element. It have to be equal to the aria-label attribute value (to avoid a double vocalisation by the screen reader).Add a title attribute on the
I choose to add it by default when there isn't text content in the button. An alternative is to add a checkbox in the cq_dialog