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.
A sidebar menu button marked
data-active="true"always getsaria-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-navis a navigation destination. It announces the active entry witharia-current="page", followingdata-activeas it changes.x-h-sidebar-menu-buttonis any other control. It never touches aria-current and leaves the attribute entirely to the author.