forked from shadowfacts/Tusker
Profile Directory screen VoiceOver improvements
Add label to filter button (and change icon to match other filters) Make each profile a single accessibility element
This commit is contained in:
parent
57668886b2
commit
60767c6a7e
|
@ -122,5 +122,24 @@ class FeaturedProfileCollectionViewCell: UICollectionViewCell {
|
||||||
displayNameLabel.updateForAccountDisplayName(account: account)
|
displayNameLabel.updateForAccountDisplayName(account: account)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Accessibility
|
||||||
|
|
||||||
|
override var isAccessibilityElement: Bool {
|
||||||
|
get { true }
|
||||||
|
set {}
|
||||||
|
}
|
||||||
|
|
||||||
|
override var accessibilityAttributedLabel: NSAttributedString? {
|
||||||
|
get {
|
||||||
|
guard let account else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
let s = NSMutableAttributedString(string: "\(account.displayName), ")
|
||||||
|
s.append(noteTextView.attributedText)
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
set {}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,9 @@ class ProfileDirectoryViewController: UIViewController {
|
||||||
|
|
||||||
title = NSLocalizedString("Profile Directory", comment: "profile directory title")
|
title = NSLocalizedString("Profile Directory", comment: "profile directory title")
|
||||||
|
|
||||||
// todo: it would be nice if there were a better "filter" icon
|
let filterItem = UIBarButtonItem(image: UIImage(systemName: "line.3.horizontal.decrease.circle"), menu: nil)
|
||||||
navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(systemName: "scope"), menu: nil)
|
filterItem.accessibilityLabel = "Filter"
|
||||||
|
navigationItem.rightBarButtonItem = filterItem
|
||||||
updateFilterMenu()
|
updateFilterMenu()
|
||||||
|
|
||||||
let layout = UICollectionViewCompositionalLayout(sectionProvider: { (sectionIndex, layoutEnvironment) in
|
let layout = UICollectionViewCompositionalLayout(sectionProvider: { (sectionIndex, layoutEnvironment) in
|
||||||
|
|
Loading…
Reference in New Issue