liveBook · Manning

Aria-current

As explained in Architecting Accessibility

aria-current is an ARIA attribute that identifies the item representing the current location or state within a related set.

A visually highlighted navigation link may still leave a screen reader user unsure which page is open. Add aria-current="page" to the link for the current page, and give sighted users a visual cue such as an underline. section 2.5.1

<ul>
  <li><a href="DivSoup.html" aria-current="page">Home</a></li> #A
  <li><a href="#">Minestrone</a></li>
  <li><a href="#">Contact</a></li>
</ul>

The Home link is marked as the current page; the other navigation links are not. section 2.5.1

header nav a[aria-current="page"] { #A
  text-decoration: underline;
  font-weight: bold;
}

CSS uses the same attribute to underline and bold the current link. section 2.5.1

Keep the links inside a semantic navigation area. With this markup, a screen reader announces the marked link as the “current page.” section 2.5.1

How Architecting Accessibility covers it

How deep it goes
Shows aria-current="page" on a link and a CSS selector for styling it; does not discuss other attribute values.
Examples
Shows a three-link navigation list with Home marked current, CSS that emphasizes it, and a screen reader’s “current page” announcement.
What you can do after
Apply it via HTML and CSS to make the current navigation link identifiable visually and to assistive technology.
How it connects
Connects aria-current to semantic HTML, navigation landmarks, screen readers, and CSS.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.