Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix : Observed Talkback Doesn't Announces Increase/Decrease Volume as "Buttons" #2422

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.LiveRegionMode
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.liveRegion
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
Expand Down Expand Up @@ -231,7 +233,7 @@ public object VolumeScreenDefaults {
@Composable
public fun IncreaseIcon() {
Icon(
modifier = Modifier.size(26.dp),
modifier = Modifier.size(26.dp).semantics { role = Role.Button },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Icon itself isn't a button. Shouldn't Stepper (Wear Compose) handle this?

We wrap it slightly, but called here.

* Wrapper for androidx.wear.compose.material.Stepper with default RSB scroll support.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stepper is not handing this. Default implementation of Increase Icon and decrease Icon description doesn't fulfill our requirement.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objection to landing this, but we should probably track a bug in Wear Compose to fix this, and revert once it happens.

paintable = Icons.AutoMirrored.Outlined.VolumeUp.asPaintable(),
contentDescription = stringResource(id = R.string.horologist_volume_screen_volume_up_content_description),
)
Expand All @@ -240,7 +242,7 @@ public object VolumeScreenDefaults {
@Composable
public fun DecreaseIcon() {
Icon(
modifier = Modifier.size(26.dp),
modifier = Modifier.size(26.dp).semantics { role = Role.Button },
paintable = Icons.AutoMirrored.Outlined.VolumeDown.asPaintable(),
contentDescription = stringResource(id = R.string.horologist_volume_screen_volume_down_content_description),
)
Expand Down
Loading