Repository navigation
fix(a11y): announce selection state on picker rows - #1627
Merged
Merged
Conversation
The currency, token, group-currency, and group-invite pickers mark the picked row with the ic_checked/ic_unchecked image, but gave the image an empty or null description and the row no selection state, so TalkBack read every row the same. The single-choice rows (ListRowItem, TokenBalanceRow with the Checkbox style, AllCurrenciesCard) now use Modifier.selectable with Role.RadioButton, and TalkBack says "selected" or "not selected". A TokenBalanceRow that shows the mark without taking taps sets `selected` through semantics instead. The group invite list is multi-select, so its rows use Modifier.toggleable with Role.Checkbox and are read as "checked" or "not checked". The check images stay decorative. Currencies without a rate were not clickable before; they are now disabled selectable rows, so TalkBack also reads them as disabled.
The flag sits next to the currency name, so an empty description only gave TalkBack an extra unlabelled image to land on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TalkBack read every row in the currency, token, group-currency, and group-invite pickers the same way. The selection was shown only by the
ic_checked/ic_uncheckedimage, which had an empty or null description, and the rows had no selection state.ListRowItem,TokenBalanceRowwithTokenSelectionStyle.Checkbox,AllCurrenciesCard) useModifier.selectablewithRole.RadioButton, so TalkBack says "selected" or "not selected". ATokenBalanceRowthat shows the mark without anonClicksetsselectedthroughsemanticsinstead.RecentChatRowin the group invite sheet is multi-select and already declaredRole.Checkbox, so it now usesModifier.toggleableand reads as "checked" or "not checked".ListRowItemandTokenBalanceRow, are decorative (contentDescription = null). The flags had"", which left TalkBack an unlabelled image next to the currency name. Visuals are unchanged.One behaviour change: region currencies with no rate were not clickable before. They are now disabled selectable rows, so TalkBack also reads them as disabled.