Skip to content

fix: use dynamic id for aria-controls in PasswordToggle.vue#36

Open
lajczi wants to merge 1 commit into
Norbiros:masterfrom
lajczi:issue/35
Open

fix: use dynamic id for aria-controls in PasswordToggle.vue#36
lajczi wants to merge 1 commit into
Norbiros:masterfrom
lajczi:issue/35

Conversation

@lajczi

@lajczi lajczi commented May 9, 2026

Copy link
Copy Markdown
Contributor

Closes #35

aria-controls="password" in PasswordToggle.vue referenced a hardcoded element id that didn't exist in the DOM causing accessibility violations flagged by lighthouse.

Fixed by generating a unique ID with Vue's useId() composable and binding it both to the UInput element and aria-controls, so the button correctly points to the actual input it controls

@Norbiros

Norbiros commented May 9, 2026

Copy link
Copy Markdown
Owner

Looks like a great fix! I just want to confirm - have you tested whether it causes any hydration errors? I don’t think it will, but it’d be great to verify.

@lajczi

lajczi commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

Looks like a great fix! I just want to confirm - have you tested whether it causes any hydration errors? I don’t think it will, but it’d be great to verify.

naturally

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.

[Bug]: aria atributes do not have valid values

2 participants