Skip to content
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

ActiveLink: add support for aria-current attribute #902

Open
msssk opened this issue May 15, 2021 · 0 comments
Open

ActiveLink: add support for aria-current attribute #902

msssk opened this issue May 15, 2021 · 0 comments

Comments

@msssk
Copy link
Contributor

msssk commented May 15, 2021

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant