diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index 76dceb19..3aa5f05d 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -227,6 +227,11 @@ open class Label: UILabel, ViewProtocol, UserInfoable { open func updateAccessibility() { accessibilityLabel = text + if isEnabled { + accessibilityTraits.remove(.notEnabled) + } else { + accessibilityTraits.insert(.notEnabled) + } } //-------------------------------------------------- diff --git a/VDS/Components/Line/Line.swift b/VDS/Components/Line/Line.swift index 17bf92c1..c90665be 100644 --- a/VDS/Components/Line/Line.swift +++ b/VDS/Components/Line/Line.swift @@ -41,12 +41,6 @@ open class Line: View { case horizontal, vertical } - //-------------------------------------------------- - // MARK: - Configuration - //-------------------------------------------------- - /// Width of the line. - public let lineWidth: CGFloat = 1.0 - //-------------------------------------------------- // MARK: - Public Properties //-------------------------------------------------- @@ -55,19 +49,25 @@ open class Line: View { /// Allows to render the line vertically. open var orientation: Orientation = .horizontal { didSet { setNeedsUpdate() } } - + /// The natural size for the receiving view, considering only properties of the view itself. open override var intrinsicContentSize: CGSize { if orientation == .vertical { - return .init(width: 1, height: bounds.height) + return .init(width: lineWidth, height: bounds.height) } else { - return .init(width: bounds.width, height: 1) + return .init(width: bounds.width, height: lineWidth) } } //-------------------------------------------------- // MARK: - Configuration //-------------------------------------------------- + /// Width of the line. + public let lineWidth: CGFloat = 1.0 + + /// Line Color for current Style and Surface. + open var lineColor: UIColor { lineViewColorConfiguration.getColor(self) } + /// Color configuration use for text color. This is a configuration that will provide a color based /// of local properties such as style and surface. open var lineViewColorConfiguration: AnyColorable = { @@ -76,7 +76,7 @@ open class Line: View { config.setSurfaceColors(VDSColor.elementsLowcontrastOnlight, VDSColor.elementsLowcontrastOndark, forKey: .secondary) return config.eraseToAnyColorable() }() - + //-------------------------------------------------- // MARK: - Overrides //-------------------------------------------------- @@ -102,7 +102,7 @@ open class Line: View { open override func draw(_ rect: CGRect) { guard let context = UIGraphicsGetCurrentContext() else { return } - context.setStrokeColor(lineViewColorConfiguration.getColor(self).cgColor) + context.setStrokeColor(lineColor.cgColor) context.setLineWidth(lineWidth) if orientation == .horizontal { diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index d1a68aef..fa341e8d 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.44 +======= +- ONEAPP-5109 - Typography/Label - Accessibility iOS + 1.0.43 ======= - CXTDT-464973 - Button - Width percentage parameter missing.