Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Accessibility. Crash on text hover on Windows #852

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

igordmn
Copy link
Collaborator

@igordmn igordmn commented Sep 29, 2023

Fix Accessibility. Crash on text hover on Windows

Fixes JetBrains/compose-multiplatform#3742

The fix is cherry-picked from androidx@7a7f57c to jb-main
(it contains other fix as well)

Because we always return false, we have textLayoutResult = null

It isn't reproducible on macOs because it doesn't call ComposeAccessibleText.getCharacterBounds

Test

  1. Modified AccessibilityTest (it fails before the fix on Windows/macOs)
  2. VoiceOver pronounces the hovered Text on macOs, Windows

Fixes JetBrains/compose-multiplatform#3742

The fix is cherry-picked from androidx@7a7f57c to jb-main
(it contains other fix as well)

Because we always return `false`, we [have textLayoutResult = null](https://github.com/JetBrains/compose-multiplatform-core/blob/7f72ab8719252acaafc753a9aa28d2940ea995df/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/ComposeAccessible.kt#L116)

It isn't reproducible on macOs because it doesn't call `ComposeAccessibleText.getCharacterBounds`
@igordmn igordmn merged commit cf1bfc7 into jb-main Oct 3, 2023
3 checks passed
@igordmn igordmn deleted the igor.demin/fix-windows-accessibility-crash branch October 3, 2023 13:27
Walingar pushed a commit that referenced this pull request Oct 5, 2023
Fix Accessibility. Crash on text hover on Windows

Fixes JetBrains/compose-multiplatform#3742

The fix is cherry-picked from
androidx@7a7f57c
to jb-main
(it contains other fix as well)

Because we always return `false`, we [have textLayoutResult =
null](https://github.com/JetBrains/compose-multiplatform-core/blob/7f72ab8719252acaafc753a9aa28d2940ea995df/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/ComposeAccessible.kt#L116)

It isn't reproducible on macOs because it doesn't call
`ComposeAccessibleText.getCharacterBounds`

# Test
1. Modified AccessibilityTest (it fails before the fix on Windows/macOs)
2. VoiceOver pronounces the hovered Text on macOs, Windows
mazunin-v-jb pushed a commit that referenced this pull request Dec 7, 2023
Fix Accessibility. Crash on text hover on Windows

Fixes JetBrains/compose-multiplatform#3742

The fix is cherry-picked from
androidx@7a7f57c
to jb-main
(it contains other fix as well)

Because we always return `false`, we [have textLayoutResult =
null](https://github.com/JetBrains/compose-multiplatform-core/blob/7f72ab8719252acaafc753a9aa28d2940ea995df/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/ComposeAccessible.kt#L116)

It isn't reproducible on macOs because it doesn't call
`ComposeAccessibleText.getCharacterBounds`

# Test
1. Modified AccessibilityTest (it fails before the fix on Windows/macOs)
2. VoiceOver pronounces the hovered Text on macOs, Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants