updated accessibility
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
324601d490
commit
6a8285d8b1
@ -364,7 +364,6 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
isAccessibilityElement = false
|
||||
accessibilityElements = [icon, badgeIndicator]
|
||||
|
||||
//create a layoutGuide for the icon to key off of
|
||||
let iconLayoutGuide = UILayoutGuide()
|
||||
@ -459,6 +458,18 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
||||
setNeedsLayout()
|
||||
}
|
||||
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
var elements = [Any]()
|
||||
if iconName != nil {
|
||||
elements.append(icon)
|
||||
}
|
||||
if badgeIndicatorModel != nil {
|
||||
elements.append(badgeIndicator)
|
||||
}
|
||||
accessibilityElements = elements.count > 0 ? elements : nil
|
||||
}
|
||||
|
||||
open override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user