updated accessibility for ButtonIcon
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
0dec879785
commit
880245d94e
@ -108,7 +108,10 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
||||
open var badgeIndicatorModel: BadgeIndicatorModel? { didSet { setNeedsUpdate() } }
|
||||
|
||||
/// Icon object used to render out the Icon for this ButtonIcon.
|
||||
open var icon = Icon().with { $0.isUserInteractionEnabled = false }
|
||||
open var icon = Icon().with {
|
||||
$0.isUserInteractionEnabled = false
|
||||
$0.accessibilityTraits = .button
|
||||
}
|
||||
|
||||
/// Determines the type of button based on the contrast.
|
||||
open var kind: Kind = .ghost { didSet { setNeedsUpdate() } }
|
||||
@ -342,9 +345,8 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .button
|
||||
accessibilityElements = [badgeIndicator]
|
||||
isAccessibilityElement = false
|
||||
accessibilityElements = [icon, badgeIndicator]
|
||||
|
||||
//create a layoutGuide for the icon to key off of
|
||||
let iconLayoutGuide = UILayoutGuide()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user