Skip to content
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

Fix bottom sheet VO order when it's hosting a navigation controller #1321

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

lcapkovic
Copy link
Contributor

@lcapkovic lcapkovic commented Oct 25, 2022

Platforms Impacted

  • iOS
  • macOS

Description of changes

Bottom sheet VO order is incorrect when a navigation controller is hosted in the sheet. It seems like there is some default system behavior that gives nested navigation controllers a higher VO priority.

In regular use, VO order is:

Parent nav controller
main content (or dimming view when visible)
sheet resizing handle
sheet header view (if present)
sheet expanded content.

But when the sheet hosts a navigation controller, the order changes to this:

Parent nav controller
(skips main content, resizing handle, and sheet header)
Sheet-hosted nav controller
the rest

To fix this, let's explicitly specify the order of a11y elements in the bottom sheet view.

Verification

Modified the demo app to include nav controller case.

Broken - before

Screen.Recording.2022-10-25.at.4.19.54.PM.mov

Fixed - after

Screen.Recording.2022-10-25.at.4.21.21.PM.mov

Tested on device and simulator with a11y inspector.

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@lcapkovic lcapkovic requested a review from a team as a code owner October 25, 2022 23:52
@lcapkovic lcapkovic merged commit c17944a into microsoft:main Oct 26, 2022
@lcapkovic lcapkovic deleted the bottomSheetA11yFix branch October 26, 2022 01:57
@harrieshin harrieshin mentioned this pull request Nov 14, 2022
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants