Skip to content

Split the sidebar menu button into menu button and menu navigation #108

Description

@StanZGenchev

A sidebar menu button marked data-active="true" always gets aria-current="page", on the assumption that the sidebar is the page's navigation. A sidebar is not always navigation. An active button may mark a selected filter, a menu/popover trigger or anything else that is not the current page, and in our own docs roughly half of the menu buttons are not navigation.

The menu button should be split into two directives that share one look and behaviour:

  • x-h-sidebar-menu-nav is a navigation destination. It announces the active entry with aria-current="page", following data-active as it changes.
  • x-h-sidebar-menu-button is any other control. It never touches aria-current and leaves the attribute entirely to the author.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions