Repository navigation
Conversation
- List item row merges its marker and content into one screen-reader stop - Lists expose CollectionInfo and items CollectionItemInfo - Paragraphs with links leave merging to an enclosing list item - Add internal LocalMarkdownMergingAncestor - Add list accessibility tests to MarkdownA11yTest
This branch has not been deployed
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.
Description
TalkBack gave every list item two stops: the marker first ("Bullet", or "1."), then the item's text on the next swipe.
MarkdownListItemgrouped the marker and the content withisTraversalGroup = true, which sets reading order but does not combine the two into one stop, so the marker'sMarkdownBasicTextwas focusable on its own.Key Changes:
MarkdownList.kt, the list item row now usessemantics(mergeDescendants = true). The marker is read with its item: "Bullet, Item 1" or "1. Item 1". It keepsisTraversalGroup = true.internalcomposition local,LocalMarkdownMergingAncestor, is set by the list item.MarkdownTextskips its own merge while it is set, so the paragraph joins the item's stop and keeps its link annotations (Link element is ignored when TalkBack is enabled #487).CollectionInfoand each itemCollectionItemInfo, so TalkBack announces "In list, 3 items" and each item's position ("1 of 3").Everything inside one item, such as two paragraphs or a code block, is now read as that item's single stop.
Fixes #668
Type of change
How Has This Been Tested?
Unit tests: five new tests in
MarkdownA11yTest. Each failed before the change and passes after it:./gradlew :multiplatform-markdown-renderer-m3:jvmTest :multiplatform-markdown-renderer:jvmTest. The existing tests pass, includinglink_paragraph_merges_yet_keeps_both_linksfrom Fixed talkBack skipping paragraphs with link by marking them merged #570.Screenshots:
./gradlew :sample:android:verifyPaparazzipasses (156 snapshots), so the change affects semantics only and nothing is drawn differently.API:
./gradlew apiCheckpasses. The new composition local isinternal.Manual: the Android sample app with TalkBack 17 on an API 37 emulator. Swiping through the ordered and unordered lists reads "1. Item 1, 1 of 3, in list, 3 items" and "Bullet, Item 1, 1 of 3, in list, 3 items", one stop per item.
Checklist: