Skip to content

Commit 99166f7

Browse files
authored
Merge pull request #19751 from wordpress-mobile/bug/19609-fix-voice-over-crash
Fix VoiceOver crash when initial screen is Home
2 parents a0f249b + c5aa0da commit 99166f7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

WordPress/Classes/ViewRelated/Reader/Tags View/DynamicHeightCollectionView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
class DynamicHeightCollectionView: AccessibleCollectionView {
3+
class DynamicHeightCollectionView: UICollectionView {
44
override func layoutSubviews() {
55
super.layoutSubviews()
66

WordPress/Classes/ViewRelated/Reader/Tags View/TopicsCollectionView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ class TopicsCollectionView: DynamicHeightCollectionView {
3737
func collapse() {
3838
coordinator?.changeState(.collapsed)
3939
}
40+
41+
override func accessibilityElementCount() -> Int {
42+
guard let dataSource else {
43+
return 0
44+
}
45+
46+
return dataSource.collectionView(self, numberOfItemsInSection: 0)
47+
}
4048
}
4149

4250
extension TopicsCollectionView: ReaderTopicCollectionViewCoordinatorDelegate {

0 commit comments

Comments
 (0)