Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Schepp opened this issue Jul 12, 2024 · 0 comments
Open

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

Schepp opened this issue Jul 12, 2024 · 0 comments

Comments

@Schepp
Copy link

Schepp commented Jul 12, 2024

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant