Digital ACT-191 ONEAPP-6827 story: updated accessibility properties
This commit is contained in:
parent
3df155bff5
commit
3d971fa569
@ -64,8 +64,7 @@ open class BreadcrumbItem: ButtonBase {
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .button
|
||||
accessibilityLabel = "Breadcrumb"
|
||||
accessibilityTraits = .link
|
||||
contentHorizontalAlignment = .leading
|
||||
titleLabel?.numberOfLines = 0
|
||||
titleLabel?.lineBreakMode = .byWordWrapping
|
||||
@ -89,4 +88,15 @@ open class BreadcrumbItem: ButtonBase {
|
||||
shouldUpdateView = true
|
||||
setNeedsUpdate()
|
||||
}
|
||||
|
||||
/// Used to update any Accessibility properties.
|
||||
open override func updateAccessibility() {
|
||||
accessibilityLabel = "Breadcrumb \(text ?? "")"
|
||||
if isEnabled {
|
||||
accessibilityTraits.remove(.notEnabled)
|
||||
} else {
|
||||
accessibilityTraits.insert(.notEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user