Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 3580b340c9291a47f6c1140b7eb4af6460b143eb
Author: George Mount <mount@google.com>
Date: Wed Aug 25 17:14:49 2021
Separate layout size from touch target size in SemanticsNode
Fixes: 197751214
SemanticsNode was changed to reflect the touch target size.
This caused many tests to have to change to be able to read
the real layout size. A new property was added to SemanticsNode
to have the size of the touch target area.
Relnote: "Added touchBoundsInRoot to SemanticsNode that
includes the minimum touch target size so that developers
can ensure that touch targets meet accessibility minimums."
Test: ran existing tests. AccessibilityScanner for checkboxes
Change-Id: I2e14bf1bab7a745aa2421353f44c734540d2489c
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ToggleableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldOnValueChangeTextFieldValueTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/CheckboxUiTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/IconButtonTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwitchTest.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/BoundsAssertions.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsWrapper.kt
https://android-review.googlesource.com/1809157
Branch: androidx-main
commit 3580b340c9291a47f6c1140b7eb4af6460b143eb
Author: George Mount <mount@google.com>
Date: Wed Aug 25 17:14:49 2021
Separate layout size from touch target size in SemanticsNode
Fixes: 197751214
SemanticsNode was changed to reflect the touch target size.
This caused many tests to have to change to be able to read
the real layout size. A new property was added to SemanticsNode
to have the size of the touch target area.
Relnote: "Added touchBoundsInRoot to SemanticsNode that
includes the minimum touch target size so that developers
can ensure that touch targets meet accessibility minimums."
Test: ran existing tests. AccessibilityScanner for checkboxes
Change-Id: I2e14bf1bab7a745aa2421353f44c734540d2489c
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ToggleableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldOnValueChangeTextFieldValueTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/CheckboxUiTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/IconButtonTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwitchTest.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/BoundsAssertions.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsWrapper.kt
Description
Minimum touch target size from ViewConfiguration changes the sizes that tests are seeing. This makes it difficult to know what the real size of a layout is.
Add a new property to SemanticsNode to retrieve the touch target size and let every other size reflect the layout size.