react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Role attribute not passed on Link component

Open Lvdwardt opened this issue 3 weeks ago โ€ข 0 comments

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

Lvdwardt avatar Nov 20 '25 12:11 Lvdwardt