feat(CON-285) : Respecter les critères d'accessibilité sur les boutons des écrans utilisateurs.
This commit is contained in:
parent
76d021d35d
commit
3ffd190406
@ -55,7 +55,7 @@ internal fun ConsentiumUIDetailConsentComponent(
|
|||||||
IconButton(onClick = { onNavigateBack() }) {
|
IconButton(onClick = { onNavigateBack() }) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
|
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
|
||||||
contentDescription = "Back",
|
contentDescription = stringResource(R.string.back),
|
||||||
tint = ConsentiumUITheme.colors.onSurface,
|
tint = ConsentiumUITheme.colors.onSurface,
|
||||||
modifier = Modifier.size(26.dp),
|
modifier = Modifier.size(26.dp),
|
||||||
)
|
)
|
||||||
|
@ -51,7 +51,7 @@ internal fun ConsentiumUIGeneralConsentComponent(
|
|||||||
AsyncImage(
|
AsyncImage(
|
||||||
modifier = Modifier.heightIn(min = 48.dp),
|
modifier = Modifier.heightIn(min = 48.dp),
|
||||||
model = generalConsentUI.iconUrl,
|
model = generalConsentUI.iconUrl,
|
||||||
contentDescription = "Image",
|
contentDescription = stringResource(R.string.app_icon),
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.FillBounds,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.stringResource
|
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.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import fr.openium.consentium_ui.R
|
import fr.openium.consentium_ui.R
|
||||||
@ -63,6 +65,10 @@ internal fun PurposeComponent(
|
|||||||
vendorUI.isAccepted = isChecked
|
vendorUI.isAccepted = isChecked
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.semantics {
|
||||||
|
contentDescription = purposeUI.title
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import fr.openium.consentium_ui.ui.components.style.ConsentiumUITheme
|
|||||||
internal fun ConsentiumUISwitch(
|
internal fun ConsentiumUISwitch(
|
||||||
checked: Boolean,
|
checked: Boolean,
|
||||||
onCheckedChange: (Boolean) -> Unit,
|
onCheckedChange: (Boolean) -> Unit,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Switch(
|
Switch(
|
||||||
checked = checked,
|
checked = checked,
|
||||||
@ -22,6 +23,7 @@ internal fun ConsentiumUISwitch(
|
|||||||
colors = SwitchDefaults.colors(
|
colors = SwitchDefaults.colors(
|
||||||
checkedTrackColor = ConsentiumUITheme.colors.secondary,
|
checkedTrackColor = ConsentiumUITheme.colors.secondary,
|
||||||
),
|
),
|
||||||
|
modifier = modifier,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="app_icon">Icone de l\'application</string>
|
||||||
|
<string name="back">Retour</string>
|
||||||
<string name="cookies">Politique de cookies</string>
|
<string name="cookies">Politique de cookies</string>
|
||||||
<string name="accept">Accepter et fermer</string>
|
<string name="accept">Accepter et fermer</string>
|
||||||
<string name="refuse">Continuer sans accepter</string>
|
<string name="refuse">Continuer sans accepter</string>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="app_icon">Application icon</string>
|
||||||
|
<string name="back">Back</string>
|
||||||
<string name="cookies">Cookie policy</string>
|
<string name="cookies">Cookie policy</string>
|
||||||
<string name="accept">Accept and close</string>
|
<string name="accept">Accept and close</string>
|
||||||
<string name="refuse">Continue without accepting</string>
|
<string name="refuse">Continue without accepting</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user