aria-current
An ARIA attribute marking the item that represents the current location, such as the link to the page you are on, with aria-current="page".
In more detail
It is the right way to highlight the current link in navigation, which should not use menu roles. Visual styling alone does not tell screen reader users which page they are on.
Related terms
- semantic HTML — Using HTML elements for their meaning, such as <button> for actions and <nav> for navigation, rather than generic <div>s.
- asChild — A prop that tells a component to render its single child element instead of its own, merging its classes, props and behaviour onto that child.
Taught in
- Polymorphism & Slotted Composition: The asChild Pattern — Design Systems & Component Engineering