@@ -40,8 +40,6 @@ import androidx.compose.ui.graphics.Shape
40
40
import androidx.compose.ui.platform.LocalContext
41
41
import androidx.compose.ui.res.painterResource
42
42
import androidx.compose.ui.semantics.Role
43
- import androidx.compose.ui.semantics.semantics
44
- import androidx.compose.ui.semantics.stateDescription
45
43
import androidx.compose.ui.state.ToggleableState
46
44
import androidx.compose.ui.tooling.preview.PreviewParameter
47
45
import androidx.compose.ui.unit.Dp
@@ -166,7 +164,6 @@ private fun OudsCheckbox(
166
164
exceptionMessage = { " An OudsCheckbox or OudsTriStateCheckbox set to disabled with error parameter activated is not allowed." }
167
165
) {
168
166
val interactionState by interactionSource.collectInteractionStateAsState()
169
- val context = LocalContext .current
170
167
val checkboxTokens = OudsTheme .componentsTokens.checkbox
171
168
val state = previewState.orElse { rememberOudsControlState(enabled = enabled, interactionState = interactionState) }
172
169
@@ -175,14 +172,7 @@ private fun OudsCheckbox(
175
172
.widthIn(checkboxTokens.sizeMinWidth.dp)
176
173
.heightIn(min = checkboxTokens.sizeMinHeight.dp, max = checkboxTokens.sizeMaxHeight.dp)
177
174
.background(color = backgroundColor(state = state))
178
- .outerBorder(state = state)
179
- .semantics {
180
- stateDescription = when (value) {
181
- ToggleableState .Off -> context.getString(R .string.core_checkbox_unchecked_a11y)
182
- ToggleableState .On -> context.getString(R .string.core_checkbox_checked_a11y)
183
- ToggleableState .Indeterminate -> context.getString(R .string.core_checkbox_indeterminate_a11y)
184
- }
185
- },
175
+ .outerBorder(state = state),
186
176
contentAlignment = Alignment .Center ,
187
177
) {
188
178
OudsCheckboxIndicator (state = state, value = value, error = error)
0 commit comments