ONEAPP-5106 - Accessibility iOS Icon
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
7df4f0cdf9
commit
1319d19359
@ -44,6 +44,7 @@ open class Icon: View {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/// UIImageView used to render the icon.
|
/// UIImageView used to render the icon.
|
||||||
open var imageView = UIImageView().with {
|
open var imageView = UIImageView().with {
|
||||||
|
$0.isAccessibilityElement = false
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
$0.contentMode = .scaleAspectFill
|
$0.contentMode = .scaleAspectFill
|
||||||
$0.clipsToBounds = true
|
$0.clipsToBounds = true
|
||||||
@ -124,6 +125,11 @@ open class Icon: View {
|
|||||||
imageView.image = nil
|
imageView.image = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func updateAccessibility() {
|
||||||
|
super.updateAccessibility()
|
||||||
|
accessibilityLabel = name?.rawValue ?? "icon"
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Private Methods
|
// MARK: - Private Methods
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user