Fix a11y for refresh progress view and adds traits

This commit is contained in:
Rizwan Mohamed Ibrahim
2020-10-07 19:50:12 +05:30
parent e4b27a27c5
commit e4ba77d1b9
2 changed files with 37 additions and 24 deletions

View File

@@ -19,6 +19,9 @@ class RefreshProgressView: UIView {
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil)
update()
scheduleUpdateRefreshLabel()
isAccessibilityElement = true
accessibilityTraits = [.updatesFrequently, .notEnabled]
}
func update() {
@@ -109,6 +112,7 @@ private extension RefreshProgressView {
label.text = ""
}
accessibilityLabel = label.text
}
func scheduleUpdateRefreshLabel() {