feat(CON-285) : Respecter les critères d'accessibilité sur les boutons des écrans utilisateurs.

This commit is contained in:
Louis Legrand 2025-02-20 12:00:36 +01:00
parent 76d021d35d
commit 3ffd190406
6 changed files with 14 additions and 2 deletions

View File

@ -55,7 +55,7 @@ internal fun ConsentiumUIDetailConsentComponent(
IconButton(onClick = { onNavigateBack() }) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Back",
contentDescription = stringResource(R.string.back),
tint = ConsentiumUITheme.colors.onSurface,
modifier = Modifier.size(26.dp),
)

View File

@ -51,7 +51,7 @@ internal fun ConsentiumUIGeneralConsentComponent(
AsyncImage(
modifier = Modifier.heightIn(min = 48.dp),
model = generalConsentUI.iconUrl,
contentDescription = "Image",
contentDescription = stringResource(R.string.app_icon),
contentScale = ContentScale.FillBounds,
)
}

View File

@ -14,6 +14,8 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import fr.openium.consentium_ui.R
@ -63,6 +65,10 @@ internal fun PurposeComponent(
vendorUI.isAccepted = isChecked
}
},
modifier = Modifier
.semantics {
contentDescription = purposeUI.title
}
)
}

View File

@ -15,6 +15,7 @@ import fr.openium.consentium_ui.ui.components.style.ConsentiumUITheme
internal fun ConsentiumUISwitch(
checked: Boolean,
onCheckedChange: (Boolean) -> Unit,
modifier: Modifier = Modifier,
) {
Switch(
checked = checked,
@ -22,6 +23,7 @@ internal fun ConsentiumUISwitch(
colors = SwitchDefaults.colors(
checkedTrackColor = ConsentiumUITheme.colors.secondary,
),
modifier = modifier,
)
}

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_icon">Icone de l\'application</string>
<string name="back">Retour</string>
<string name="cookies">Politique de cookies</string>
<string name="accept">Accepter et fermer</string>
<string name="refuse">Continuer sans accepter</string>

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_icon">Application icon</string>
<string name="back">Back</string>
<string name="cookies">Cookie policy</string>
<string name="accept">Accept and close</string>
<string name="refuse">Continue without accepting</string>