Skip to content

Commit

Permalink
fix(style-schedule): add missing content description for PauseItem.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed Oct 22, 2023
1 parent 0ea4ea5 commit a1fa251
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import org.gdglille.devfest.android.theme.m3.style.Conferences4HallTheme
import org.gdglille.devfest.android.theme.m3.style.R
import org.gdglille.devfest.android.theme.m3.style.tags.Tag
import org.gdglille.devfest.android.theme.m3.style.tags.TagDefaults
import org.gdglille.devfest.android.theme.m3.style.toDp
Expand All @@ -35,13 +39,14 @@ fun PauseItem(
titleTextStyle: TextStyle = PauseItemDefaults.titleTextStyle,
shape: Shape = PauseItemDefaults.shape
) {
val contentDescription = stringResource(id = R.string.semantic_pause_item, room, time)
Surface(shape = shape, color = containerColor, modifier = modifier) {
Column(
verticalArrangement = Arrangement.spacedBy(PauseItemTokens.BetweenSpacing.toDp()),
modifier = Modifier
.fillMaxWidth()
.padding(PauseItemTokens.ContainerPadding.toDp())
// TODO .clearAndSetSemantics { contentDescription = semanticTalk }
.clearAndSetSemantics { this.contentDescription = contentDescription }
) {
Text(
text = title,
Expand Down
1 change: 1 addition & 0 deletions theme-m3/style/theme/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<string name="semantic_website">Site de %s</string>
<string name="semantic_start_itinerary">Démarrer l\'itinéraire vers l\'évènement</string>
<string name="semantic_talk_item">%s %s dans la salle %s pendant %d minutes dans la catégorie %s %s</string>
<string name="semantic_pause_item">Pause dans %s pendant %s</string>
<string name="semantic_talk_item_speakers">avec %s comme speaker</string>
<string name="semantic_talk_item_level">pour niveau %s</string>
<string name="semantic_user_item_email">Addresse e-mail %s</string>
Expand Down
1 change: 1 addition & 0 deletions theme-m3/style/theme/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<string name="semantic_website">Website of %s</string>
<string name="semantic_start_itinerary">Start itinerary to the event</string>
<string name="semantic_talk_item">%s %s in %s room during %d minutes in category %s %s</string>
<string name="semantic_pause_item">Break in %s during %s</string>
<string name="semantic_talk_item_speakers">with %s as speaker</string>
<string name="semantic_talk_item_level">for level %s</string>
<string name="semantic_user_item_email">Email address %s</string>
Expand Down

0 comments on commit a1fa251

Please sign in to comment.