-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add accessibility identifier to MauiDoneAccessoryView Done button for UI testing #32828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add accessibility identifier to MauiDoneAccessoryView Done button for UI testing #32828
Conversation
Co-authored-by: jfversluis <[email protected]>
Co-authored-by: jfversluis <[email protected]>
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds an accessibility identifier to the Done button in iOS numeric keyboard's input accessory view to enable UI testing automation. The change addresses GitHub issue #32825 by adding the identifier "Microsoft.Maui.Platform.MauiDoneAccessory.DoneButton" to the UIBarButtonItem in both MauiDoneAccessoryView constructors and includes a comprehensive UI test to verify the functionality.
Key Changes
- Added accessibility identifier constant and assignment to UIBarButtonItems in MauiDoneAccessoryView
- Created UI test infrastructure to verify the Done button is accessible and functional
- Implemented test page with Entry control using numeric keyboard to demonstrate the feature
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Core/src/Platform/iOS/MauiDoneAccessoryView.cs | Added constant for automation ID and assigned it to Done button in both constructors |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/MauiDoneAccessoryButton.cs | NUnit UI test that verifies Done button accessibility and tap behavior |
| src/Controls/tests/TestCases.HostApp/Issues/MauiDoneAccessoryButton.cs | Test page with numeric Entry demonstrating Done button functionality |
src/Controls/tests/TestCases.HostApp/Issues/MauiDoneAccessoryButton.cs
Outdated
Show resolved
Hide resolved
…utton.cs Co-authored-by: Copilot <[email protected]>
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
jfversluis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing test unrelated
…2828) Add accessibility identifier to MauiDoneAccessoryView Done button Co-authored-by: jfversluis <[email protected]> Address code review feedback - extract constant and improve comment Co-authored-by: jfversluis <[email protected]> Update src/Controls/tests/TestCases.HostApp/Issues/MauiDoneAccessoryButton.cs Co-authored-by: Copilot <[email protected]>
…2828) Add accessibility identifier to MauiDoneAccessoryView Done button Co-authored-by: jfversluis <[email protected]> Address code review feedback - extract constant and improve comment Co-authored-by: jfversluis <[email protected]> Update src/Controls/tests/TestCases.HostApp/Issues/MauiDoneAccessoryButton.cs Co-authored-by: Copilot <[email protected]>
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
The Done button in numeric keyboard's input accessory view was not accessible for UI testing due to missing accessibility identifier.
Changes:
AccessibilityIdentifier = "Microsoft.Maui.Platform.MauiDoneAccessory.DoneButton"on UIBarButtonItem in both MauiDoneAccessoryView constructorsUsage in tests:
Issues Fixed
Fixes #32825
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.