Skip to content

Automatic aria-current on Link and other components accepting href prop #5664

@arzatskis

Description

@arzatskis

Provide a general summary of the feature here

Seems it's not there, event when following client side routing guide. Would be nice to have a easy, non-manual way to add this

🤔 Expected Behavior?

This could work same way as react-routers NavLink

😯 Current Behavior

Currently you can only manually pass <Link aria-current /> and isCurrent in render props will be available based on that, but you need to manually track that everywhere (maybe I'm missing something)

💁 Possible Solution

aria-current could be appended automatically or some kind of prop for RouterProvider to enable this maybe?

🔦 Context

This would be helpful not only for Links in navigation, but also other elements accepting href prop. E.g. <Row href="?preview=uuid" /> once clicked, panel is opened up with details and one could style current row based on that

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

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