From e3e5ed68fb2b2e88456a99e818c7522ad2cc173d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 1 Aug 2023 14:05:42 -0500 Subject: [PATCH] updated radiobutton group to deal with the item count label Signed-off-by: Matt Bruce --- VDS/Components/RadioBox/RadioBoxGroup.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VDS/Components/RadioBox/RadioBoxGroup.swift b/VDS/Components/RadioBox/RadioBoxGroup.swift index d0f8bef2..0742459f 100644 --- a/VDS/Components/RadioBox/RadioBoxGroup.swift +++ b/VDS/Components/RadioBox/RadioBoxGroup.swift @@ -33,9 +33,10 @@ open class RadioBoxGroup: SelectorGroupSelectedHandlerBase { public var selectorModels: [RadioBoxModel]? { didSet { if let selectorModels { - selectorViews = selectorModels.map { model in + selectorViews = selectorModels.enumerated().map { index, model in return RadioBoxItem().with { $0.accessibilityLabel = model.accessibileText + $0.accessibilityValue = "item \(index+1) of \(selectorModels.count)" $0.text = model.text $0.textAttributes = model.textAttributes $0.subText = model.subText