Skip to content

Role attribute not passed on Link component #9218

@Lvdwardt

Description

@Lvdwardt

Provide a general summary of the issue here

I am using the react-aria Link component, and I want to add role="menuitem" to it, but the final rendered <a> doesn't include it.

🤔 Expected Behavior?

Any props I add to the Link component will be passed to the final rendered component.

😯 Current Behavior

Not all props are added to the final rendered component.

💁 Possible Solution

Either allow role, and any other items to the link component, or update the docs to specify that this prop is not supported

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/react-aria-components-template-g7wmmk

Version

1.12.0

What browsers are you seeing the problem on?

Chrome, Safari, Firefox

If other, please specify.

No response

What operating system are you using?

Mac

🧢 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