Use useId instead of requiring consumers to provide an id as a prop
- Dominant language
- TypeScript
- Stars
- 163
- Forks
- 28
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 54
Description
Also see https://github.com/Kong/kongponents/pull/2562#pullrequestreview-2552214235
Ideally if an `id` is only required internally by a component for aria or other reasons, then a component should instead use Vue's `useId` to provide that `id` instead of requiring the consumer of the component to provide one.
This goes for any component that uses `id` similarly not just KCodeBlock (which the above comment/link refers to)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the KCodeBlock discussion in pull request 2562, then search the component library for components that require an id only for internal accessibility or related purposes. Review each candidate's existing tests and replace consumer-provided ids with Vue's useId where appropriate. Done means the affected components no longer require those internal ids from consumers and their tests cover the resulting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100