Visitar URL original
ActiveLink: add support for aria-current attribute · Issue #902 · dojo/framework · GitHub
Skip to content

ActiveLink: add support for aria-current attribute #902

Open

Description

@msssk

Enhancement

ActiveLink would benefit from adding support for the aria-current attribute. This could be achieved by adding an ariaCurrent property and setting it when the link is active.

export interface ActiveLinkProperties extends LinkProperties {
	activeClasses: SupportedClassName[];
	ariaCurrent?: 'page' | 'step' | 'location' | 'date' | 'time' | true;
	isExact?: boolean;
}

Code

<ActiveLink
    to="myRoute"
    classes="link"
    activeClasses="active"
    ariaCurrent="page"
>
    Link to my route
</ActiveLink>

Expected behavior:

<a href="myroute" class="link active" aria-current="page">Link to my route</a>

Activity

  1. MohamedAhmedGalhoum commented on Nov 8, 2026

    @MohamedAhmedGalhoum

    Hi, I’d like to work on issue #902. I plan to add the optional ariaCurrent property to ActiveLink, apply it to the rendered link only when the route is active, and add tests for active and inactive states. Is this still wanted, and is there an existing branch or PR I should coordinate with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions