Skip to content

[iOS] Fix VoiceOver focus not shifting to Picker/DatePicker/TimePicker popups - #31912

Closed
jsuarezruiz wants to merge 3 commits into
mainfrom
fix-30746
Closed

jsuarezruiz wants to merge 3 commits into
mainfrom
fix-30746

Conversation

@jsuarezruiz

Copy link
Copy Markdown
Contributor

Description of Change

This PR include some extension methods to use UIAccessibility.PostNotification calls to notify VoiceOver when picker popups appear and close for Picker, DatePicker, and TimePicker.

  • Open Picker: Posts a VoiceOver notification when an input view becomes visible.
  • Close Picker: Posts a VoiceOver notification to return focus to the original control.

Based on the issue description, the picker should:

  • When the Picker is opened, UIAccessibility.PostNotification(ScreenChanged, inputView) is called with the UIPickerView, VoiceOver focuses on the picker control.
  • Once focused on the UIPickerView, VoiceOver users can naturally navigate through the individual items. This try to follow iOS accessibility patterns where you first focus on the container control, then navigate within it.
  • When closing the picker, restores the VoiceOver focus.

Draft PR until include some related tests.

Issues Fixed

Fixes #30746

@jsuarezruiz jsuarezruiz added platform/ios area-controls-picker Picker t/a11y Relates to accessibility labels Oct 8, 2025
@jsuarezruiz jsuarezruiz changed the title Apply fixes [iOS] Fix VoiceOver focus not shifting to Picker/DatePicker/TimePicker popups Oct 8, 2025
@PureWeen

Copy link
Copy Markdown
Member

/rebase

@jsuarezruiz
jsuarezruiz marked this pull request as ready for review October 17, 2025 08:59
Copilot AI review requested due to automatic review settings October 17, 2025 08:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds iOS accessibility support so VoiceOver focus shifts correctly when Picker, DatePicker, and TimePicker popups (input views or alert controllers) open and closes. Introduces internal extension methods to post UIAccessibility ScreenChanged notifications and wires them into the handlers' start/end events.

  • Adds PostAccessibilityFocusNotification extension overloads in SemanticExtensions
  • Invokes notifications on open (start/editing) and close (end) for Picker/DatePicker/TimePicker
  • Adjusts Picker alert presentation to await controller presentation before posting accessibility notification

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
src/Core/src/Platform/iOS/SemanticExtensions.cs Adds internal extension methods to post VoiceOver screen change notifications for input view focus management.
src/Core/src/Handlers/TimePicker/TimePickerHandler.iOS.cs Calls accessibility notifications on popup open and close to shift/restore VoiceOver focus.
src/Core/src/Handlers/Picker/PickerHandler.iOS.cs Adds notifications for picker input view / alert presentation and dismissal; changes to async presentation.
src/Core/src/Handlers/DatePicker/DatePickerHandler.iOS.cs Adds notifications on date picker open and close to manage VoiceOver focus.

Comment thread src/Core/src/Handlers/Picker/PickerHandler.iOS.cs
Comment thread src/Core/src/Platform/iOS/SemanticExtensions.cs
Comment thread src/Core/src/Platform/iOS/SemanticExtensions.cs
Comment thread src/Core/src/Handlers/TimePicker/TimePickerHandler.iOS.cs
Comment thread src/Core/src/Handlers/Picker/PickerHandler.iOS.cs
Comment thread src/Core/src/Handlers/DatePicker/DatePickerHandler.iOS.cs
@kubaflo

kubaflo commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

Closed in favour of #33152

@kubaflo kubaflo closed this Dec 14, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-picker Picker platform/ios t/a11y Relates to accessibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Voiceover does not automatically shift focus to the "Category" popup when it opens.: A11y_Developer balance version .NET 10_Project_ScreenReader

4 participants