Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

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:

  • Set AccessibilityIdentifier = "Microsoft.Maui.Platform.MauiDoneAccessory.DoneButton" on UIBarButtonItem in both MauiDoneAccessoryView constructors
  • Added UI test verifying Done button accessibility and tap behavior

Usage in tests:

App.WaitForElement("Microsoft.Maui.Platform.MauiDoneAccessory.DoneButton");
App.Tap("Microsoft.Maui.Platform.MauiDoneAccessory.DoneButton");

Issues Fixed

Fixes #32825

Original prompt

This section details on the original issue you should resolve

<issue_title>Make MauiDoneAccessoryView DoneButton accessible</issue_title>
<issue_description>### Description

PR #24645 added a Done button to numeric entry's keyboard.

Currently it's not accessible because no Id is assigned.
IMHO Maui should set some Id(Microsoft.Maui.Platform.MauiDoneAccessory.DoneButton?) to enable UI-Tests

Steps to Reproduce

  1. Add a Entry with numeric keyboard to a page
  2. Inspect elements

Link to public reproduction project repository

No response

Version with bug

10.0.10

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add Id to Done button for accessibility Add accessibility identifier to MauiDoneAccessoryView Done button for UI testing Nov 24, 2025
Copilot AI requested a review from jfversluis November 24, 2025 09:55
@jfversluis
Copy link
Member

jfversluis commented Nov 24, 2025

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis jfversluis marked this pull request as ready for review November 24, 2025 10:29
Copilot AI review requested due to automatic review settings November 24, 2025 10:29
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a 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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Failing test unrelated

@jfversluis jfversluis changed the base branch from main to inflight/current November 26, 2025 13:47
@jfversluis jfversluis merged commit 9ff4e77 into inflight/current Nov 26, 2025
115 of 118 checks passed
@jfversluis jfversluis deleted the copilot/make-done-button-accessible branch November 26, 2025 13:48
PureWeen pushed a commit that referenced this pull request Dec 3, 2025
…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]>
jfversluis added a commit that referenced this pull request Dec 5, 2025
github-actions bot pushed a commit that referenced this pull request Dec 5, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make MauiDoneAccessoryView DoneButton accessible

3 participants