Skip to content

Commit c0ca0bc

Browse files
committed
fix(a11y): revert touch-only copy button visibility to fix target-size violation
The @media (hover: none) block that made copy buttons always visible on touch caused the absolutely-positioned button (top: 100%) to appear between the package header and the sticky subheader, landing within 24px of the provenance shield link and failing the target-size audit. Revert to display: none on touch devices to eliminate the overlap.
1 parent d0d6a82 commit c0ca0bc

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

app/components/CopyToClipboardButton.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,9 @@ function handleClick() {
8989
}
9090
9191
@media (hover: none) {
92-
/* On touch devices show the button statically (no hover possible) */
92+
/* On touch devices, hide the button since hover is not available */
9393
.copyButton {
94-
clip: auto;
95-
clip-path: none;
96-
height: auto;
97-
overflow: visible;
98-
width: auto;
99-
opacity: 1;
100-
translate: none;
101-
pointer-events: auto;
102-
transition: none;
94+
display: none;
10395
}
10496
}
10597
</style>

0 commit comments

Comments
 (0)