Status Update
Comments
mo...@google.com <mo...@google.com>
gr...@google.com <gr...@google.com> #2
Thanks for the additional information in the report!
Can confirm that this repros on foundation 1.7.5 and is fixed in 1.8.0-alpha05 (API 34 pixel 5). Using talkback, the icon is skipped not skipped in 1.8 but is in 1.7.5.
repro code:
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.text.BasicText
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.appendInlineContent
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.Placeholder
import androidx.compose.ui.text.PlaceholderVerticalAlign
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.unit.sp
@Composable
fun Repro() {
val id = "inline"
val placeholder = Placeholder(16.sp, 16.sp, PlaceholderVerticalAlign.Center)
val inlineContent = InlineTextContent(placeholder) { InlineContent() }
val inlineContentMap = mapOf(id to inlineContent)
val text = buildAnnotatedString {
append("before text - ")
appendInlineContent(id)
append(" - after text")
}
BasicText(text, inlineContent = inlineContentMap)
}
@Composable
private fun InlineContent() {
Box(
modifier = Modifier
.semantics {
this.contentDescription = "Red Box"
this.role = Role.Image
}
.background(Color.Red)
.fillMaxSize()
)
}
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Grant Toepfer <
Link:
Add test for text inline content semantics
Expand for full commit details
Add test for text inline content semantics
Adds a test for a cherry-pick in 1.7, see aosp/3341487.
Bug: b/376479686
Test: androidx.compose.foundation.text.BasicTextSemanticsTest.inlineContentSemantics_matchesInMergedSemantics
Change-Id: I22c5be1bf542a390e7d6d14851a1134787fb2028
Files:
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/BasicTextSemanticsTest.kt
Hash: 21332df933adc3afa9bdee0fb729d6ed81d83669
Date: Thu Nov 07 17:16:32 2024
gr...@google.com <gr...@google.com> #5
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: Grant Toepfer <
Link:
Stabilize invisibleToUser
Expand for full commit details
Stabilize `invisibleToUser`
A 1.7 cherry-pick (aosp/3341487) to fix b/376479686 calls `invisibleToUser` from the foundation module, but it cannot depend on `invisibleToUser` if it is still experimental, so experimental was removed from `invisibleToUser` in 1.7 (via aosp/3387946). This change removes experimental from `invisibleToUser` in 1.8+ so that it matches the change in 1.7 for binary compatibility.
Leaving relnote blank since `invisibleToUser` is still deprecated in 1.8+
Relnote: N/A
Bug: b/376479686
Test: N/A
Change-Id: I40cdd6a3d335011e890761560a5a3416aa579991
Files:
- M
compose/ui/ui/api/current.txt
- M
compose/ui/ui/api/restricted_current.txt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/SemanticsUtils.android.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
Hash: 211cbf6550baa068eb56bf80d767c5ef1e882674
Date: Mon Dec 02 16:33:49 2024
gr...@google.com <gr...@google.com>
bu...@google.com <bu...@google.com> #9
bu...@google.com <bu...@google.com> #11
gr...@google.com <gr...@google.com> #12
Should be fixed in compose foundation 1.7.6
. Reporter, please verify your use case is working.
si...@gmail.com <si...@gmail.com> #13
Can confirm the fix is working in 1.7.6
Description
Jetpack Compose version: 1.7.5
Jetpack Compose component(s) used: foundation
Steps to Reproduce or Code Sample to Reproduce:
TalkBack TreeDebug logs:
Version 1.6.8 (BOM 2024.08.00)
Notice last line - "Important warning" is present
Version 1.7.5 (BOM 2024.10.01)
There "Important warning" is missing
Version 1.8.0-alpha05 (BOM-alpha 2024.10.01)
There "Important warning" is back again
It seems like this regression was added in Icd0becab6818712ab7fa6f3abe83f441a841af5e and fixed in I531e7bad97cda327974696686357a9e56430a6a6 (see TextAnnotatedStringNode.shouldClearDescendantSemantics). Although it is fixed in 1.8-alpha, version 1.7 is broken, preventing our app from updating.