Skip to content

fix(authenticator): Add accessible names for password toggle and form errors - #7254

Open
VarshithaPamisetty wants to merge 8 commits into
mainfrom
fix/authenticator-form-field-accessible-names
Open

fix(authenticator): Add accessible names for password toggle and form errors#7254
VarshithaPamisetty wants to merge 8 commits into
mainfrom
fix/authenticator-form-field-accessible-names

Conversation

@VarshithaPamisetty

Copy link
Copy Markdown
Contributor

Issue #, if available:
Fixes #6568
Fixes #6581

Description:
Continues the work in #6577 by @ekjotmultani, addressing the review feedback.

Adds tooltip/accessible names to the password visibility toggle so screen readers announce "Show password"/"Hide password" (#6568), and wraps banner and form content in semantics so validation errors are announced (#6581).

Review follow-ups from #6577:

  • Tooltip strings are defined in the ARB source (inputs_en.arb) and reflected in the generated localizations.
  • A blank helperText is set on the input fields as a workaround for [a11y] VoiceOver does not announce form validation errors flutter/flutter#99715 so validation errors are announced on web; this adds a consistent helper line under every field, which the updated golden snapshots reflect.
  • Golden snapshots updated for the new form-field layout.

Tests

  • Added widget tests for the password toggle accessible name (Show/Hide) and the banner/snackbar live-region announcements.
  • Full authenticator suite passes locally; dart analyze and dart format clean.
  • Manually verified with VoiceOver on web (Chrome): the toggle announces "Show password" / "Hide password", and submitting an empty form auto-announces the validation error via the live-region.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

… errors

Adds tooltip/accessible names to the password visibility toggle so screen
readers announce "Show password"/"Hide password", and wraps banner and form
content in semantics so validation errors are announced. Tooltip strings are
defined in the inputs ARB source (inputs_en.arb) and reflected in the
generated localizations.

Continues the work in #6577 by @ekjotmultani.

Issues:
#6568
#6581
@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.24%. Comparing base (b0c2048) to head (623350f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7254      +/-   ##
==========================================
+ Coverage   40.97%   41.24%   +0.26%     
==========================================
  Files         121      121              
  Lines        8273     8288      +15     
  Branches     3598     3604       +6     
==========================================
+ Hits         3390     3418      +28     
+ Misses       4883     4870      -13     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cadivus cadivus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this new gap between "Password" and "Confirm Password" come from? I think it looks a bit odd.

Image

@cadivus

cadivus commented Aug 10, 2026

Copy link
Copy Markdown
Member

Where does this new gap between "Password" and "Confirm Password" come from? I think it looks a bit odd.

Image

Is it eventually caused by the empty helper text? If so, how about setting https://api.flutter.dev/flutter/material/InputDecoration/helperStyle.html to make the font small (1? even 0?).

@VarshithaPamisetty

Copy link
Copy Markdown
Contributor Author

Yes, it's from the "helperText: ' '" workaround. I'll try your helperStyle suggestion to collapse the gap and confirm VoiceOver still announces the error, then update.

VarshithaPamisetty and others added 2 commits August 10, 2026 22:11
…sert semantic labels

The helperText:' ' workaround for flutter#99715 (validation errors not announced on web) is no longer needed: the bug was fixed in 2023 and the package's minimum Flutter is 3.41.0. Verified on 3.41.0 that field errors are still announced without it. Removing it also fixes the extra vertical gap under every field and reverts the golden snapshots to main.

Strengthens the a11y test to assert the toggle's semantic label via tester.getSemantics + isSemantics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants