mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixes part of #180496 ## Summary Pass form validation errors to screen readers via `aria-description` on text fields. **Before:** https://flutter-demo-04-before.web.app/ **After:** https://flutter-demo-04-after.web.app/ ## Limitations & Future Work This handles **string-based errors** (`errorText`). For more complex cases(brought in https://github.com/flutter/flutter/issues/180496#issuecomment-3713178684), a follow-up implementation using `aria-describedby` with element IDs is tracked in #180496: - Custom error widgets (`InputDecoration.error`) - Errors outside `InputDecoration` - Custom announcement ordering The `aria-description` approach (current) and `aria-describedby` approach (future) can coexist per ARIA specifications. ## Related - Related discussion: #169157 comments