[aria-current]

Term side of the Card.
Topic: Global ARIA Attributes
Unit title: [aria-current]
Categories: Attribute
Explanation side of the Card

Explanation: The attribute that indicates the current item within a set of related elements. It helps users identify which item is active or current, such as in navigation menus or progress indicators.

Example

Wronghtml
<nav>
  <a href="/" class="active" aria-selected="true">Home</a>
  <a href="/blog">Blog</a>
</nav>
Righthtml
<nav>
  <a href="/" aria-current="page">Home</a>
  <a href="/blog">Blog</a>
</nav>

aria-current='page' tells screen readers which link is the current page; CSS can style it with [aria-current='page'].

Common mistakes

  • Highlighting the active nav link only with a CSS class, so screen readers do not know it is current.
  • Using aria-selected on navigation links, which only works inside widgets like tabs or listboxes.

Key points

  • The current page link uses aria-current='page', not aria-selected or a class alone.
  • Only one item in a set has aria-current at a time.
  • The token fits the context: 'page', 'step', 'location', 'date', 'time' or 'true'.

Interview questions

What is the difference between aria-current and aria-selected?

aria-current marks the current item in a set, like a page or step. aria-selected marks chosen items inside widgets such as tabs, listboxes and grids.

Can I style the active link with the aria-current attribute?

Yes. Selecting [aria-current='page'] in CSS keeps the visual state and the accessible state in sync.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy