paparazzi icon indicating copy to clipboard operation
paparazzi copied to clipboard

`AccessibliityRenderExtension` causes layout bug when content uses `animateContentSize` modifier

Open drewhamilton opened this issue 1 year ago • 9 comments

Description When any part of Compose UI content uses the animateContentSize modifier, and AccessibilityRenderExtension is used, the content is offset 50% to the left of where it should be, leaving a blank gap in the remaining 50% of space in between the shifted content and the rendered accessibility info. This occurs even if InstantAnimationsRule is used.

It does not occur if AccessibilityRenderExtension is not used.

Steps to Reproduce

  1. Check out my animate-content-size-accessibility-bug branch
  2. Run ./gradlew sample:recordPaparazziDebug --tests=ComposeA11yTest
  3. Compare app.cash.paparazzi.sample_ComposeA11yTest_animateContentSize[false].png and app.cash.paparazzi.sample_ComposeA11yTest_animateContentSize[true].png

Note that the image with renderAccessibilityInfo set to false renders correctly, while the one with renderAccessibilityInfo set to true incorrectly offsets the content.

Expected behavior The content should not be offset.

Additional information:

  • Paparazzi Version: master branch
  • OS: MacOS (M1 Max)
  • Compile SDK: Paparazzi sample
  • Gradle Version: 8.3
  • Android Gradle Plugin Version: 8.1.1

Screenshots app cash paparazzi sample_ComposeA11yTest_animateContentSize true

drewhamilton avatar Dec 01 '23 23:12 drewhamilton