Skip to content

fix(password): remove aria-expanded from the input - #740

Open
tokainz wants to merge 1 commit into
openvi-foundation:masterfrom
tokainz:fix/password-aria-expanded
Open

tokainz wants to merge 1 commit into
openvi-foundation:masterfrom
tokainz:fix/password-aria-expanded

Conversation

@tokainz

@tokainz tokainz commented Nov 20, 2026

Copy link
Copy Markdown

What does this PR do?

Since 4.4.1 the Password input has aria-expanded. A password field has no ARIA role, and aria-expanded is only allowed on roles like combobox or button. axe (for example the Storybook a11y addon) therefore reports aria-allowed-attr.

This is a regression: aria-expanded was removed before, but added back in 36338d5.

The fix:
The fix is just removing the aria-expanded from the input.

Why not aria-describedby as suggested in the linked PR of the Issue:

  • It resolves the overlay id differently from aria-controls. It ignores overlayProps.id and panelProps.id, which override the overlay’s id, so it can point to an element that doesn’t exist.
  • The overlay is only rendered in onFocus. When the screen reader reads the description on focus, the element usually doesn’t exist yet.
  • The strength is already announced through the hidden aria-live region.

Out of scope but worth a look in another PR:

  • The strength text is announced twice in VoiceOver. It sits both in the overlay (aria-live="polite") and in the hidden live region.
  • aria-haspopup on the input and role="dialog" on the overlay don’t really fit either. The overlay is informational, not interactive, and focus never moves into it.

Related issue

Closes #132

Checklist

  • Tests added or updated for the change
  • pnpm run lint and pnpm run format pass
  • Changelog entry added under ## [Unreleased] in CHANGELOG.md (skip for internal refactors, tests, CI, and docs typos)

@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

@tokainz is attempting to deploy a commit to the njevric's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

Password uses invalid aria attribute

1 participant