Skip to content

Suggestion to use anchor links instead of buttons for markers #29

@Schepp

Description

@Schepp

In the explainer for markers, these are built as buttons with invokers. What keeps us from using simple anchor links in conjunction with scroll-behavior: smooth on the scroll container, to reach the same goal of a target element smoothly scrolling into view? Is it just because without JavaScript layer it shows up in the address bar?

<ul class="toc" focusgroup="invoke">
  <li><a tabindex="-1" href="#section-1">Section 1</a></li>
  <li><a tabindex="-1" href="#section-2">Section 2</a></li>
  <li><a tabindex="-1" href="#section-3">Section 3</a></li>
  <li><a tabindex="-1" href="#section-4">Section 4</a></li>
</ul>
<section id="section-1">...</section>
<section id="section-2">...</section>
<section id="section-3">...</section>
<section id="section-4">...</section>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions