Skip to content

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

Merged
Norbiros merged 1 commit into
Norbiros:masterfrom
lajczi:issue/35
Jul 10, 2026
Merged

fix: use dynamic id for aria-controls in PasswordToggle.vue#36
Norbiros merged 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鈥檛 think it will, but it鈥檇 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鈥檛 think it will, but it鈥檇 be great to verify.

naturally

@lajczi

lajczi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@Norbiros could you review this?

@Norbiros
Norbiros merged commit 63019f6 into Norbiros:master Jul 10, 2026
2 checks passed
@lajczi
lajczi deleted the issue/35 branch July 10, 2026 15:37
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