mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 20:23:25 +01:00
Improves My Apps tab accessibility
This commit is contained in:
@@ -18,6 +18,7 @@ class InstalledAppsCollectionHeaderView: UICollectionReusableView
|
|||||||
self.textLabel = UILabel()
|
self.textLabel = UILabel()
|
||||||
self.textLabel.translatesAutoresizingMaskIntoConstraints = false
|
self.textLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||||
self.textLabel.font = UIFont.systemFont(ofSize: 24, weight: .bold)
|
self.textLabel.font = UIFont.systemFont(ofSize: 24, weight: .bold)
|
||||||
|
self.textLabel.accessibilityTraits.insert(.header)
|
||||||
|
|
||||||
self.button = UIButton(type: .system)
|
self.button = UIButton(type: .system)
|
||||||
self.button.translatesAutoresizingMaskIntoConstraints = false
|
self.button.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|||||||
@@ -1367,7 +1367,18 @@ extension MyAppsViewController
|
|||||||
headerView.button.addTarget(self, action: #selector(MyAppsViewController.refreshAllApps(_:)), for: .primaryActionTriggered)
|
headerView.button.addTarget(self, action: #selector(MyAppsViewController.refreshAllApps(_:)), for: .primaryActionTriggered)
|
||||||
|
|
||||||
headerView.button.layoutIfNeeded()
|
headerView.button.layoutIfNeeded()
|
||||||
headerView.button.isIndicatingActivity = self.isRefreshingAllApps
|
|
||||||
|
if self.isRefreshingAllApps
|
||||||
|
{
|
||||||
|
headerView.button.isIndicatingActivity = true
|
||||||
|
headerView.button.accessibilityLabel = NSLocalizedString("Refreshing", comment: "")
|
||||||
|
headerView.button.accessibilityTraits.remove(.notEnabled)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
headerView.button.isIndicatingActivity = false
|
||||||
|
headerView.button.accessibilityLabel = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return headerView
|
return headerView
|
||||||
|
|||||||
Reference in New Issue
Block a user