Skip to content

Conversation

@AryanBagade
Copy link

Description

The Link component was missing the id prop in its TypeScript interface, even though it worked at runtime via filterDOMProps. This adds DOMProps to LinkProps interface to expose the id prop, matching the pattern used by other components like OverlayArrow and FieldError.

Closes #9348

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Import the Link component from react-aria-components
  2. Verify TypeScript no longer shows an error when using the id prop:
    <Link id="my-link" href="/test">Click me</Link>
  3. Run the test suite: yarn test packages/react-aria-components/test/Link.test.js
  4. Confirm all 13 tests pass, including the new "should support id prop" test

🧢 Your Project:

Personal contribution (Author : Aryan Bagade aryan.com)

The Link component was missing the `id` prop in its TypeScript interface, even though it worked at runtime via filterDOMProps. This adds DOMProps to LinkProps interface to expose the id prop, matching the pattern used by other components like OverlayArrow and FieldError

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id prop missing from RAC Link component

2 participants