Skip to content

docs: add useId example for aria-labelledby in reusable components#3398

Open
MD-Mushfiqur123 wants to merge 1 commit into
vuejs:mainfrom
MD-Mushfiqur123:fix/aria-labelledby-useid-example
Open

docs: add useId example for aria-labelledby in reusable components#3398
MD-Mushfiqur123 wants to merge 1 commit into
vuejs:mainfrom
MD-Mushfiqur123:fix/aria-labelledby-useid-example

Conversation

@MD-Mushfiqur123
Copy link
Copy Markdown

Description

When \�ria-labelledby\ is used inside a Vue component that may be rendered multiple times on the same page, static \id\ values will collide. This PR adds a tip showing how to use Vue's \useId()\ helper to generate unique, stable IDs for each component instance.

This addresses #1510.

Screenshots

N/A - documentation only change.

PR Type

  • Bugfix
  • Feature
  • Documentation
  • Code style update
  • Refactor
  • Build-related changes
  • Other (describe below)

Related Issues

Closes #1510

When aria-labelledby is used inside a component that may be rendered
multiple times on the same page, static id values will collide. This
adds a tip showing how to use Vue's useId() helper to generate unique,
stable IDs for each component instance.

fixes vuejs#1510
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 926eca6
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/6a0c54492f6d260008981e3a
😎 Deploy Preview https://deploy-preview-3398--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Successfully merging this pull request may close these issues.

aria-labelledby example with id and components

1 participant