-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The aria-current
docs aren't clear about how to handle a "current" nav-item that isn't a link-to-current-page.
#2583
Comments
doesn't targeted guidance like this belong in the aria authoring practices? |
Perhaps—and apologies if I posted this in the wrong place. On the other hand, my concern is that the spec itself is unclear, so maybe this is the right place? For example, I find the spec's description of the
What does "the current component" mean here? I imagine that "the element that is visually styled as the current component" is meant to be more specific than the generic "element within a set of related elements [that] is visually styled to indicate it is the current item in the set," but to me it doesn't read that way, and I'm left wondering how the |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<Matt_King> TOPIC: ISSUE 2583 The aria-current docs aren't clear about how to handle a "current" nav-item that isn't a link-to-current-page.<Matt_King> github: https://github.com//issues/2583 <helen> Advice: use 'aria-current="true" but the AT may have the same result as aria-current="page" |
The TF recommendation is to use current=true on ancestor pages represented in site navigation structures, e.g. a top-level menu that includes a link to an ancestor page that is styled as current. |
One open question on this is where the TF recommendation on this question should be communicated in the APG. |
Describe your concern
It's clear enough that if a link in a set of nav-links goes to the current page, then it should get
aria-current="page"
. However, there are other situations where an item in a navigational structure is somehow "current" (and potentially styled accordingly) but is not a link-to-current-page, and here it's not clear from the docs what should be done.For example, sometimes a main-nav consists only of top-level links, and the "current" style (if present) then indicates merely that the user is currently on some page within the corresponding section of the site. In this case,
aria-current="page"
presumably wouldn't be appropriate. Should one usearia-current="location"
? Oraria-current="true"
? Or noaria-current
attribute at all?Another example would be a multi-level navigational structure, where the current-page-link is nested at the bottom of a "tree." Here, higher-level elements in the current-link's "branch" are also "current" in a way that someone using a screen-reader might appreciate being made aware of. What value (if any) should be used for
aria-current
on those higher-level "current" items?I think that fleshing out the
aria-current
documentation a bit more could help clarify these kinds of situations for developers.(From what I'm seeing in the sidebar of this W3 page, I'd guess that
aria-current="location"
is the appropriate attribute to use for the scenarios I described above, but I'm not sure.)Link to the version of the specification or documentation you were looking at at.
Link to documentation: https://w3c.github.io/aria/#aria-current
Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?
Yes
The text was updated successfully, but these errors were encountered: