fix: include multiline TextView in iOS accessibility dump#294
Conversation
Multiline React Native TextInput renders as UITextView (XCUIElementTypeTextView), which was missing from acceptedTypes so it was dropped from the dump and could not be located or filled. Add TextView to the accepted and always-include sets, matching TextField. Fixes mobile-next#293 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis change updates the WDA source element filtering logic in devices/wda/source.go to accept Changes
Related PRs: None identified. Suggested labels: bug, tests Suggested reviewers: None identified. 🐰 A rabbit hops through XML trees so tall, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
Multiline React Native
TextInputcomponents render on iOS as aUITextView, which WDA reports asXCUIElementTypeTextView. The accessibility-dump filter indevices/wda/source.goonly acceptedTextField(single-lineUITextField), so multiline inputs were dropped from the tree entirely — making them impossible to locate (getByLabel()) or fill.Fixes #293
Fix
Add
TextViewto both theacceptedTypeslist and thealwaysIncludeset infilterSourceElements, mirroring howTextFieldis handled (so it's kept even when it has no label/name yet, e.g. an auto-focused empty field).Tests
Added two tests in
source_test.go:TextViewis included in the dumpTextViewis always includedgo test ./devices/wda/passes.🤖 Generated with Claude Code