Digital ACT-191 CXTDT-559318 defect: added fix for the calendar elements are not receiving swipe focus.
This commit is contained in:
parent
6d1809b8f9
commit
eedf33e47c
@ -126,7 +126,7 @@ open class CalendarBase: Control, Changeable {
|
|||||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = false
|
||||||
accessibilityLabel = "Calendar"
|
accessibilityLabel = "Calendar"
|
||||||
addSubview(containerView)
|
addSubview(containerView)
|
||||||
containerView
|
containerView
|
||||||
|
|||||||
@ -31,6 +31,8 @@ class CalendarFooterReusableView: UICollectionReusableView {
|
|||||||
|
|
||||||
internal var containerView = View().with {
|
internal var containerView = View().with {
|
||||||
$0.clipsToBounds = true
|
$0.clipsToBounds = true
|
||||||
|
$0.isAccessibilityElement = true
|
||||||
|
$0.accessibilityLabel = "Legend"
|
||||||
}
|
}
|
||||||
|
|
||||||
private let flowLayout = LeftAlignedCollectionViewFlowLayout().with {
|
private let flowLayout = LeftAlignedCollectionViewFlowLayout().with {
|
||||||
@ -40,6 +42,13 @@ class CalendarFooterReusableView: UICollectionReusableView {
|
|||||||
$0.scrollDirection = .vertical
|
$0.scrollDirection = .vertical
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override var accessibilityElements: [Any]? {
|
||||||
|
get {
|
||||||
|
return [containerView, legendLabels]
|
||||||
|
}
|
||||||
|
set { super.accessibilityElements = newValue }
|
||||||
|
}
|
||||||
|
|
||||||
open lazy var legendCollectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout).with {
|
open lazy var legendCollectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout).with {
|
||||||
$0.isScrollEnabled = false
|
$0.isScrollEnabled = false
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
@ -55,6 +64,7 @@ class CalendarFooterReusableView: UICollectionReusableView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private var topConstraint: NSLayoutConstraint?
|
private var topConstraint: NSLayoutConstraint?
|
||||||
|
private var legendLabels: [Label] = []
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
@ -94,6 +104,7 @@ class CalendarFooterReusableView: UICollectionReusableView {
|
|||||||
func update(with surface: Surface, indicators: [CalendarBase.CalendarIndicatorModel]) {
|
func update(with surface: Surface, indicators: [CalendarBase.CalendarIndicatorModel]) {
|
||||||
self.items = indicators
|
self.items = indicators
|
||||||
self.surface = surface
|
self.surface = surface
|
||||||
|
legendLabels.removeAll()
|
||||||
legendCollectionView.reloadData()
|
legendCollectionView.reloadData()
|
||||||
|
|
||||||
var height = legendCollectionView.collectionViewLayout.collectionViewContentSize.height
|
var height = legendCollectionView.collectionViewLayout.collectionViewContentSize.height
|
||||||
@ -124,6 +135,7 @@ extension CalendarFooterReusableView: UICollectionViewDelegate, UICollectionView
|
|||||||
surface: self.surface,
|
surface: self.surface,
|
||||||
clearFullcircle: indexPath.row == 1,
|
clearFullcircle: indexPath.row == 1,
|
||||||
drawSemiCircle: indexPath.row == 2)
|
drawSemiCircle: indexPath.row == 2)
|
||||||
|
legendLabels.append(cell.title)
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,12 +156,12 @@ private class LegendCollectionViewCell: UICollectionViewCell {
|
|||||||
|
|
||||||
private let indicatorColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsSecondaryOnlight, VDSColor.elementsSecondaryOndark)
|
private let indicatorColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsSecondaryOnlight, VDSColor.elementsSecondaryOndark)
|
||||||
|
|
||||||
private var title: Label = Label().with {
|
open var title: Label = Label().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
$0.textAlignment = .left
|
$0.textAlignment = .left
|
||||||
$0.numberOfLines = 1
|
$0.numberOfLines = 1
|
||||||
$0.textStyle = .bodySmall
|
$0.textStyle = .bodySmall
|
||||||
$0.isAccessibilityElement = false
|
$0.isAccessibilityElement = true
|
||||||
$0.backgroundColor = .clear
|
$0.backgroundColor = .clear
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class CalendarHeaderReusableView: UICollectionReusableView {
|
|||||||
$0.numberOfLines = 1
|
$0.numberOfLines = 1
|
||||||
$0.textStyle = .boldBodySmall
|
$0.textStyle = .boldBodySmall
|
||||||
$0.backgroundColor = .clear
|
$0.backgroundColor = .clear
|
||||||
$0.isAccessibilityElement = false
|
$0.isAccessibilityElement = true
|
||||||
}
|
}
|
||||||
|
|
||||||
internal let daysOfWeek = Date.capitalizedFirstLettersOfWeekdays
|
internal let daysOfWeek = Date.capitalizedFirstLettersOfWeekdays
|
||||||
@ -212,7 +212,7 @@ private class collectionViewCell: UICollectionViewCell {
|
|||||||
$0.numberOfLines = 1
|
$0.numberOfLines = 1
|
||||||
$0.textStyle = .bodySmall
|
$0.textStyle = .bodySmall
|
||||||
$0.backgroundColor = .clear
|
$0.backgroundColor = .clear
|
||||||
$0.isAccessibilityElement = false
|
$0.isAccessibilityElement = true
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
- CXTDT-556996 - RadioboxGroup – Accessibility - Voice over does not render the group position
|
- CXTDT-556996 - RadioboxGroup – Accessibility - Voice over does not render the group position
|
||||||
- CXTDT-560458 - Dropdown & TextArea voiceover behaviour
|
- CXTDT-560458 - Dropdown & TextArea voiceover behaviour
|
||||||
- CXTDT-560485 - Tilelet - Accessibility
|
- CXTDT-560485 - Tilelet - Accessibility
|
||||||
|
- CXTDT-559318 - Calendar - Accessibility
|
||||||
|
|
||||||
1.0.64
|
1.0.64
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user