Fixed
Status Update
Comments
jo...@google.com <jo...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes: b/307694651
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
https://android-review.googlesource.com/3046833
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes:
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
so...@google.com <so...@google.com> #3
Good point, please create a separate bug.
If I understand correctly, this error API was designed specifically for text fields, and I didn't see it's being used anywhere else. There is also a "contentInvalid" API in the accessibility services that could be used to mark something like invalid date.
We'll need to discuss whether we could unify the API or whether 2 APIs are necessary.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 72e2c2a4cddeaf9a80e664fd6fb8a12b9d962c48
Author: Anastasia Soboleva <soboleva@google.com>
Date: Tue Mar 23 15:34:44 2021
Add error API to mark node that contains invalid input
In accessibility services there're two APIs - setContentInvalid(Boolean) and setError(CharSequence).
And yet setting the error text requires the former to be set to true. At the same time, just setting contentInvalid to true will not result in anything.
Therefore having two APIs is not very beneficial and may only cause confusion. As such, in this CL I introduce a single API that takes an error description.
Name was not a clear choice, but decided to go with `error()` (as oppose to invalid or invalidContent) because
* this is what TextView uses, so developers should be familiar
* our material text fields have a 'isError' parameter for styling purpose. Therefore, it will be easier for developers to find the semantics if it has a very close name to something that is already treated as error.
In material text field we supply error semantics with default message in case developers forget to provide this semantics.
Relnote: "Added accessibility API `error` that allows to mark a node that contains invalid input"
Fixes: 180584804
Fixes: 182142737
Test: new tests in AndroidComposeViewAccessibilityDelegateCompatTest
Test: manually with Talkback on and alternative locale
Change-Id: I129977e3d3b5f03435de41de409fde9029c325b9
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MaterialTextField.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextFieldSamples.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/TextFieldTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Strings.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
M compose/ui/ui/api/1.0.0-beta06.txt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_1.0.0-beta06.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_1.0.0-beta06.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidComposeViewAccessibilityDelegateCompatTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
https://android-review.googlesource.com/1651127
Branch: androidx-main
commit 72e2c2a4cddeaf9a80e664fd6fb8a12b9d962c48
Author: Anastasia Soboleva <soboleva@google.com>
Date: Tue Mar 23 15:34:44 2021
Add error API to mark node that contains invalid input
In accessibility services there're two APIs - setContentInvalid(Boolean) and setError(CharSequence).
And yet setting the error text requires the former to be set to true. At the same time, just setting contentInvalid to true will not result in anything.
Therefore having two APIs is not very beneficial and may only cause confusion. As such, in this CL I introduce a single API that takes an error description.
Name was not a clear choice, but decided to go with `error()` (as oppose to invalid or invalidContent) because
* this is what TextView uses, so developers should be familiar
* our material text fields have a 'isError' parameter for styling purpose. Therefore, it will be easier for developers to find the semantics if it has a very close name to something that is already treated as error.
In material text field we supply error semantics with default message in case developers forget to provide this semantics.
Relnote: "Added accessibility API `error` that allows to mark a node that contains invalid input"
Fixes: 180584804
Fixes: 182142737
Test: new tests in AndroidComposeViewAccessibilityDelegateCompatTest
Test: manually with Talkback on and alternative locale
Change-Id: I129977e3d3b5f03435de41de409fde9029c325b9
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MaterialTextField.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextFieldSamples.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/TextFieldTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Strings.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
M compose/ui/ui/api/1.0.0-beta06.txt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_1.0.0-beta06.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_1.0.0-beta06.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidComposeViewAccessibilityDelegateCompatTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
Description
Use the Error API that a11y services are providing.