ONEAPP-4684 - Acessibility - Tooltip (Header)
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
71ef62ebbf
commit
196bc52288
@ -61,7 +61,7 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
||||
isUserInteractionEnabled = !actions.isEmpty
|
||||
if actions.isEmpty {
|
||||
tapGesture = nil
|
||||
accessibilityTraits = .staticText
|
||||
|
||||
} else {
|
||||
//add tap gesture
|
||||
if tapGesture == nil {
|
||||
@ -174,6 +174,7 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
||||
lineBreakMode = .byWordWrapping
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
accessibilityCustomActions = []
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .staticText
|
||||
textAlignment = .left
|
||||
setup()
|
||||
@ -304,7 +305,6 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
||||
if let accessibilityElements, !accessibilityElements.isEmpty {
|
||||
let staticText = UIAccessibilityElement(accessibilityContainer: self)
|
||||
staticText.accessibilityLabel = text
|
||||
staticText.accessibilityTraits = .staticText
|
||||
staticText.accessibilityFrameInContainerSpace = bounds
|
||||
|
||||
isAccessibilityElement = false
|
||||
|
||||
@ -58,7 +58,6 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
|
||||
open var titleLabel = Label().with { label in
|
||||
label.isAccessibilityElement = true
|
||||
label.accessibilityTraits = .header
|
||||
label.textStyle = .boldTitleMedium
|
||||
}
|
||||
|
||||
@ -99,6 +98,8 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
|
||||
titleLabel.accessibilityTraits = .header
|
||||
|
||||
layer.cornerRadius = 8
|
||||
contentStackView.addArrangedSubview(titleLabel)
|
||||
contentStackView.addArrangedSubview(contentLabel)
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
1.0.47
|
||||
=======
|
||||
- ONEAPP-4684 - Acessibility - Tooltip (Header)
|
||||
|
||||
1.0.46
|
||||
=======
|
||||
- ONEAPP-4828 - Accessibility - Toggle
|
||||
|
||||
Loading…
Reference in New Issue
Block a user