ONEAPP-4684 - Acessibility - Tooltip (Header)

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-10-27 13:14:36 -05:00
parent 71ef62ebbf
commit 196bc52288
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -1,3 +1,7 @@
1.0.47
=======
- ONEAPP-4684 - Acessibility - Tooltip (Header)
1.0.46
=======
- ONEAPP-4828 - Accessibility - Toggle