Merge branch 'bugfix/calendar' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git into mbruce/bugfix

# Conflicts:
#	VDS/SupportingFiles/ReleaseNotes.txt

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-05-28 11:59:39 -05:00
commit 9c09841815
4 changed files with 20 additions and 7 deletions

View File

@ -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.
open override func setup() {
super.setup()
isAccessibilityElement = true
isAccessibilityElement = false
accessibilityLabel = "Calendar"
addSubview(containerView)
containerView

View File

@ -31,6 +31,8 @@ class CalendarFooterReusableView: UICollectionReusableView {
internal var containerView = View().with {
$0.clipsToBounds = true
$0.isAccessibilityElement = true
$0.accessibilityLabel = "Legend"
}
private let flowLayout = LeftAlignedCollectionViewFlowLayout().with {
@ -39,7 +41,7 @@ class CalendarFooterReusableView: UICollectionReusableView {
$0.minimumInteritemSpacing = VDSLayout.space4X
$0.scrollDirection = .vertical
}
open lazy var legendCollectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout).with {
$0.isScrollEnabled = false
$0.translatesAutoresizingMaskIntoConstraints = false
@ -55,7 +57,8 @@ class CalendarFooterReusableView: UICollectionReusableView {
}
private var topConstraint: NSLayoutConstraint?
private var legendLabels: [Label] = []
//--------------------------------------------------
// MARK: - Initializers
//--------------------------------------------------
@ -69,6 +72,13 @@ class CalendarFooterReusableView: UICollectionReusableView {
setUp()
}
open override var accessibilityElements: [Any]? {
get {
return [containerView, legendLabels]
}
set { super.accessibilityElements = newValue }
}
//--------------------------------------------------
// MARK: - Private Methods
//--------------------------------------------------
@ -94,6 +104,7 @@ class CalendarFooterReusableView: UICollectionReusableView {
func update(with surface: Surface, indicators: [CalendarBase.CalendarIndicatorModel]) {
self.items = indicators
self.surface = surface
legendLabels.removeAll()
legendCollectionView.reloadData()
var height = legendCollectionView.collectionViewLayout.collectionViewContentSize.height
@ -124,6 +135,7 @@ extension CalendarFooterReusableView: UICollectionViewDelegate, UICollectionView
surface: self.surface,
clearFullcircle: indexPath.row == 1,
drawSemiCircle: indexPath.row == 2)
legendLabels.append(cell.title)
return cell
}
@ -144,12 +156,12 @@ private class LegendCollectionViewCell: UICollectionViewCell {
private let indicatorColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsSecondaryOnlight, VDSColor.elementsSecondaryOndark)
private var title: Label = Label().with {
open var title: Label = Label().with {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.textAlignment = .left
$0.numberOfLines = 1
$0.textStyle = .bodySmall
$0.isAccessibilityElement = false
$0.isAccessibilityElement = true
$0.backgroundColor = .clear
}

View File

@ -86,7 +86,7 @@ class CalendarHeaderReusableView: UICollectionReusableView {
$0.numberOfLines = 1
$0.textStyle = .boldBodySmall
$0.backgroundColor = .clear
$0.isAccessibilityElement = false
$0.isAccessibilityElement = true
}
internal let daysOfWeek = Date.capitalizedFirstLettersOfWeekdays
@ -212,7 +212,7 @@ private class collectionViewCell: UICollectionViewCell {
$0.numberOfLines = 1
$0.textStyle = .bodySmall
$0.backgroundColor = .clear
$0.isAccessibilityElement = false
$0.isAccessibilityElement = true
}
//--------------------------------------------------

View File

@ -4,6 +4,7 @@
- CXTDT-560458 - Dropdown & TextArea voiceover behaviour
- CXTDT-560485 - Tilelet - Accessibility
- CXTDT-563189 - Dropdown Select Readonly Border color
- CXTDT-559318 - Calendar - Accessibility
1.0.64
----------------