A back-to-top control needs a real destination and an accessible name. Put it where a reader naturally finishes a long page.
Worked example
<div class="stack">
<section id="top" class="box stack">
<h2>Top</h2>
<p>The start of the guide.</p>
</section>
<p>End of chapter.</p>
<footer><a href="#top">↑ Back to top</a></footer>
</div>Implementation notes
A scroll animation alone does not necessarily move keyboard focus. Inspect the next tab destination after activating the control.
Try it yourself
Activate it with a keyboard and continue tabbing from the destination.
Open the UI Components example →Editorial date May 28, 2026 · Published December 6, 2026