fix(authenticator): Add accessible names for password toggle and form errors - #7254
fix(authenticator): Add accessible names for password toggle and form errors#7254VarshithaPamisetty wants to merge 10 commits into
Conversation
… 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 Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7254 +/- ##
==========================================
+ Coverage 40.98% 41.25% +0.26%
==========================================
Files 121 121
Lines 8273 8288 +15
Branches 3598 3604 +6
==========================================
+ Hits 3391 3419 +28
+ Misses 4882 4869 -13 🚀 New features to boost your workflow:
|
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?). |
|
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. |
…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.
Removed the |


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:
Tests
dart analyzeanddart formatclean.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.