Skip to content

Commit 8237f3a

Browse files
authored
[LOOP-3384] update cgm pill accessibility label with status highlights (#544)
1 parent 7c815fb commit 8237f3a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

LoopUI/ViewModel/CGMStatusHUDViewModel.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public class CGMStatusHUDViewModel {
6060
if isManualGlucoseCurrent {
6161
// If there is a current manual glucose, it displays the current status highlight icon
6262
setManualGlucoseTrendIconOverride()
63+
} else if let localizedMessage = storedStatusHighlight?.localizedMessage,
64+
let statusState = storedStatusHighlight?.state
65+
{
66+
accessibilityString = localizedMessage + ", " + statusState.localizedDescription
6367
}
6468
}
6569
}
@@ -152,6 +156,9 @@ public class CGMStatusHUDViewModel {
152156
if isManualGlucoseCurrent {
153157
// a manual glucose value presents any status highlight icon instead of a trend icon
154158
setManualGlucoseTrendIconOverride()
159+
if let statusState = storedStatusHighlight?.state {
160+
accessibilityStrings.append(statusState.localizedDescription)
161+
}
155162
} else if let trend = glucoseDisplay?.trendType, glucoseValueCurrent {
156163
self.trend = trend
157164
glucoseTrendTintColor = glucoseDisplay?.glucoseRangeCategory?.trendColor ?? .glucoseTintColor

0 commit comments

Comments
 (0)