Improves AppBannerView accessibility

This commit is contained in:
Riley Testut
2020-08-27 15:23:21 -07:00
parent 49d6e66745
commit a3a4af182d
10 changed files with 201 additions and 50 deletions

View File

@@ -44,7 +44,6 @@ private extension SourcesViewController
cell.tintColor = tintColor
cell.bannerView.iconImageView.isHidden = true
cell.bannerView.betaBadgeView.isHidden = true
cell.bannerView.buttonLabel.isHidden = true
cell.bannerView.button.isHidden = true
cell.bannerView.button.isIndicatingActivity = false
@@ -53,6 +52,10 @@ private extension SourcesViewController
cell.bannerView.subtitleLabel.text = source.sourceURL.absoluteString
cell.bannerView.subtitleLabel.numberOfLines = 2
let attributedLabel = NSAttributedString(string: source.name + "\n" + source.sourceURL.absoluteString, attributes: [.accessibilitySpeechPunctuation: true])
cell.bannerView.accessibilityAttributedLabel = attributedLabel
cell.bannerView.accessibilityTraits.remove(.button)
// Make sure refresh button is correct size.
cell.layoutIfNeeded()
}