Status Update
Comments
da...@well.co <da...@well.co> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
co...@google.com <co...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
da...@well.co <da...@well.co> #4
I am not against saying the resolution to the issues will be to migrate to material 3. I dont think we will do it for a while but as long as it works there I am good with that as a solution.
Summary of issues with Layout vs Material 2
- Drop down announces differently when focused. Layout: "[SELECTION] drop down list [Drop Down Label]. Double tap to change." Compose: "drop down menu double tap to activate."
- Open drop down it reads nothing and then reads the EditBox and then it finally goes into the menu
- When you make a selection it reads differently Layout: "[SECOND SELECTION] drop down list [Drop Down Label]. Double tap to change." Compose: "2 replaced 1" then moves focus to the text below which is "Blah2"
- It reads drop down and edit box seperately
What version of material3 you testing on. I tried the below code on the material3 android studio template. I updated all versions to latest. In specific compose is 1.3.1 and material 3 is 1.0.1:
Column {
Text("Blah")
ExposedDropdownMenuBox(
expanded = expanded,
onExpandedChange = {
expanded = !expanded
}
) {
OutlinedTextField(
modifier = Modifier.menuAnchor(),
readOnly = true,
value = selectedOptionText,
onValueChange = { },
label = { Text("Label") },
trailingIcon = {
ExposedDropdownMenuDefaults.TrailingIcon(
expanded = expanded
)
},
colors = ExposedDropdownMenuDefaults.textFieldColors()
)
ExposedDropdownMenu(
expanded = expanded,
onDismissRequest = {
expanded = false
}
) {
options.forEach { selectionOption ->
DropdownMenuItem(
text = { Text(text = selectionOption) },
onClick = {
selectedOptionText = selectionOption
expanded = false
}
)
}
}
}
Text("Blah2")
}
Material 3 results
- Focus on drop down it reads: "[SELECTION] EditBox drop down menu [Drop Down Label]. Double tap and hold to to long press. Actions available use tap with 3 fingers to view."
- Click on Drop down it reads: "Expanded" swipe "Blah 2", swipe "[Label] window popup window. Double tap to activate"
- Scroll to second option in popup window it reads: "[SECOND SELECTION] double tap to activate"
- Select second option in drop down it reads: "2 replaced 1" then moves focus to the text below which is "Blah2"
Would be good to have a full ADA audit of this control as it seems to me to still have many issues. I think
Hopefully this is kind of clear as there is alot above.
ya...@well.co <ya...@well.co> #5
ya...@well.co <ya...@well.co> #6
da...@gmail.com <da...@gmail.com> #7
dependencies { implementation "androidx.compose.material:material:1.5.4" }
android { buildFeatures { compose true }
composeOptions {
kotlinCompilerExtensionVersion = "1.5.3"
}
kotlinOptions {
jvmTarget = "1.8"
}
}
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit b01be1f0984e1ae035582524be989edc14b83b42
Author: Max Alfonso-Ying <maxying@google.com>
Date: Fri Apr 05 00:22:27 2024
Improve a11y of editable ExposedDropdownMenus
Updated `Modifier.menuAnchor` to support icons in addition
to text fields. Now takes a parameter for MenuAnchorType
so we can set popup flags accordingly. Also added an enabled
parameter to control if the anchor is enabled.
This means editable EDMs can use 2 menu anchors to
support both flows of typing and direct selection when
a11y services are enabled.
Updated sample to show this usage.
Fixes:
Test: Added unit tests for enabled/disabled menuAnchor. Manual testing with TalkBack
Relnote: "`ExposedDropdownMenuBoxScope` no longer permits subclasses.
Exposed dropdown menus now have a `MenuAnchorType` which
should be passed to `menuAnchor` to support better a11y.
This should be used instead of passing `focusable` to
`ExposedDropdownMenu`, which is now deprecated.
`menuAnchor` has a new parameter to control `enabled` state."
Change-Id: I55ee632daf66ef4df90297350cbff901e26ea446
M compose/material3/benchmark/src/androidTest/java/androidx/compose/material3/benchmark/ExposedDropdownMenuBenchmark.kt
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/ExposedDropdownMenuSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.android.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/internal/Strings.android.kt
M compose/material3/material3/src/androidMain/res/values/strings.xml
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/internal/Strings.kt
M compose/material3/material3/src/desktopMain/kotlin/androidx/compose/material3/internal/Strings.desktop.kt
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.3.0-alpha05
androidx.compose.material3:material3-android:1.3.0-alpha05
androidx.compose.material3:material3-desktop:1.3.0-alpha05
Description
Jetpack Compose version: 1.3.0 Jetpack Compose component used: ExposedDropdownMenuBox,TextField Android Studio Build: 2022.1.1 Canary 2 Kotlin version: 1.7.10
How the layout system would read a dropdown
Which the above is pretty reasonable
Compose for the same situation and configuration reads:
So there is multiple things wrong above. I am not saying it needs to be the same as layout system but the same or better.
Also if you look at second 0:40-0:50 you will see it reads out the drop down and edit box separately. This is not working like a user would expect.
This is a really bad UX and I think the only reasonable work around is to use the layout system for all drop downs.
Appreciate you looking into this ADA issue.