Skip to content

Improve floating notification accessibility announcement timing#2566

Merged
kynansongwork merged 1 commit intomainfrom
sonic/SONIC-4572-floating-notification-a11y-bugfix
May 1, 2026
Merged

Improve floating notification accessibility announcement timing#2566
kynansongwork merged 1 commit intomainfrom
sonic/SONIC-4572-floating-notification-a11y-bugfix

Conversation

@dennis-li-skyscanner
Copy link
Copy Markdown
Contributor

@dennis-li-skyscanner Dennis Li (dennis-li-skyscanner) commented Apr 30, 2026

Updates FloatingNotificationAnimator so the VoiceOver layout change notification is posted after the floating notification presentation animation completes.

This ensures the notification message label is announced once the notification has finished moving into its displayed position.

Before

ScreenRecording_04-30-2026.14-32-51_1.MP4

After

ScreenRecording_04-30-2026.14-31-57_1.MP4

Remember to include the following changes:

  • README.md - Not applicable; no documentation or API changes.
  • Tests - Not added; small UIKit animation completion timing change.
  • Screenshotting code - Not applicable; no visual change.
  • Adding a component? Remember to expose it in the main Backpack.h header file - Not applicable; no new component.

Copilot AI review requested due to automatic review settings April 30, 2026 13:40
Copy link
Copy Markdown
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

Adjusts the floating notification presentation so the VoiceOver .layoutChanged notification is posted after the “animate up” transition completes, improving the timing of the accessibility announcement.

Changes:

  • Moves the UIAccessibility.post(notification: .layoutChanged, ...) call from the animation block to the animator completion block.

notification.bottomConstraint.constant = displayedBottomConstraintConstant
notification.superview?.layoutIfNeeded()
}
upAnimator.addCompletion { position in
Copy link
Copy Markdown
Contributor Author

@dennis-li-skyscanner Dennis Li (dennis-li-skyscanner) Apr 30, 2026

Choose a reason for hiding this comment

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

I think an extra call is not harmful.
The code should notify the a11y engine to focus the label in all animation position

@kynansongwork kynansongwork merged commit 5fa6b85 into main May 1, 2026
30 checks passed
@kynansongwork kynansongwork deleted the sonic/SONIC-4572-floating-notification-a11y-bugfix branch May 1, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants