Skip to content

Commit 4cc83e0

Browse files
committed
a11y: show toolbar tooltips on keyboard focus (Fixes #19156)
1 parent ccd9e23 commit 4cc83e0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

web/viewer.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,22 @@ dialog :link {
843843
height: auto;
844844
}
845845
}
846+
/* Show tooltips for keyboard users */
847+
&:focus::after,
848+
&:hover::after {
849+
content: attr(title);
850+
position: absolute;
851+
top: 100%;
852+
left: 50%;
853+
transform: translateX(-50%);
854+
white-space: nowrap;
855+
background: rgb(0 0 0 / 0.8);
856+
color: #fff;
857+
padding: 4px 6px;
858+
border-radius: 4px;
859+
font-size: 12px;
860+
pointer-events: none;
861+
}
846862
}
847863

848864
.toolbarButtonWithContainer {

0 commit comments

Comments
 (0)