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

Tooltip icon to be tabbed and showing the tooltip #3431

Merged
merged 5 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions libs/features/icons/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@
border-color: transparent transparent #0469E3;
}

.milo-tooltip:hover::before {
.milo-tooltip:hover::before,
.milo-tooltip:focus::before,
.milo-tooltip:active::before {
display: block;
}

.milo-tooltip:hover::after {
.milo-tooltip:hover::after,
.milo-tooltip:focus::after,
.milo-tooltip:active::after {
display: block;
}
2 changes: 2 additions & 0 deletions libs/features/icons/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function decorateToolTip(icon) {
// Position is the next to last part of a tooltip
const place = conf.pop()?.trim().toLowerCase() || 'right';
icon.className = `icon icon-info milo-tooltip ${place}`;
icon.setAttribute('tabindex', '0');
seanchoi-dev marked this conversation as resolved.
Show resolved Hide resolved
icon.setAttribute('role', 'button');
wrapper.parentElement.replaceChild(icon, wrapper);
}

Expand Down
Loading