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

Accessibility scrolling enhancements #283

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed an issue that could cause the calendar to layout unnecessarily due to a trait collection change notification
- Fixed an issue that could cause off-screen items to appear or disappear instantly, rather than animating in or out during animated content changes
- Fixed an issue that caused a SwiftUI view being used as a calendar item to not receive calls to `onAppear`
- Fixed an accessibility issue that prevented scrolling callbacks from firing when scrolling via voiceover.

### Changed
- Removed all deprecated code, simplifying the public API in preparation for a 2.0 release
Expand Down
7 changes: 7 additions & 0 deletions Sources/Public/CalendarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,13 @@ extension CalendarView {
let accessibilityScrollText = targetMonthView.accessibilityLabel
UIAccessibility.post(notification: .pageScrolled, argument: accessibilityScrollText)

// ensure that scrolling related callbacks are still fired when performing scrolling via accessibility
if let visibleDayRange {
didScroll?(visibleDayRange, false)
didEndDragging?(visibleDayRange, true)
didEndDecelerating?(visibleDayRange)
}

return true
}

Expand Down
Loading