Skip to content

Should we add a button in the toc component to be able toggle the navigation ? #6

@ggrossetie

Description

@ggrossetie

I'm working on a stylesheet factory that's compatible with a semantic HTML5 output.
One popular request is to be able to create an off-canvas Table Of Contents with a button to toggle it.

I think it will be easier to style the <button> if we put it outside the <nav> ?

<button aria-expanded="false">Table Of Contents</button>
<nav id="navigation">
  <ul>
    <li><a href="#section-1">Section 1</a></li>
    <li><a href="#section-2">Section 2</a></li>
    <li><a href="#section-3">Section 3</a></li>
    <li><a href="#section-4">Section 4</a></li>
  </ul>
</nav>

What do you think ?

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