From a788c8bb7a773e55d5e2aa633fa088bbb8747950 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Tue, 30 Jun 2026 05:18:07 +0200 Subject: [PATCH] fix(ui): make the back-to-top button resist ad-block cosmetic filters Ad-block annoyance lists (e.g. Brave Shields) hide floating corner buttons via attribute selectors like [aria-label="Back to top"] / [title=...]. Drop both attributes and provide the accessible name with a visually-hidden child span instead, which those selectors can't match. --- frontend/src/components/BackToTop.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/BackToTop.tsx b/frontend/src/components/BackToTop.tsx index fc021bd..26bc792 100644 --- a/frontend/src/components/BackToTop.tsx +++ b/frontend/src/components/BackToTop.tsx @@ -28,16 +28,18 @@ export default function BackToTop({ dep, threshold = 600 }: { dep?: unknown; thr const toTop = () => scrollerRef.current?.scrollTo({ top: 0, behavior: "smooth" }); + // No aria-label/title attributes: ad-block "annoyance" cosmetic filters (e.g. Brave Shields) + // commonly hide floating corner buttons via attribute selectors like [aria-label="Back to top"]. + // The accessible name comes from a visually-hidden child instead, which those selectors can't match. return createPortal( , document.body );