Hi everyone, I’ve been working on accessibility wi...
# compose-desktop
u
Hi everyone, I’ve been working on accessibility with Compose for Desktop (macOS + Windows) and I noticed the following issue: • On macOS with VoiceOver, when focusing a
TextField
, neither the
label
parameter nor
.semantics { contentDescription = ... }
is read aloud. • On Windows with NVDA, the label is correctly read. • For error messages (e.g. “wrong password”), even when displaying them in a
BasicTextField
, they are not announced by the screen reader. They are only read if focus is moved manually (with some hacks). On Android, there is
LocalAccessibilityManager.announceForAccessibility(...)
which allows announcing messages like errors. But this doesn’t exist on Desktop, and it seems impossible to announce such errors today. Is there a recommended way to make error messages (or dynamic text changes) announced by VoiceOver/NVDA on Desktop? If not, would JetBrains be open to contributions in this area? Related issue: https://youtrack.jetbrains.com/issue/CMP-2136 Thanks!
a
We’re aware of these issues, unfortunately there are several more urgent issues we’re handling. This is a rather complicated, and frankly, messy, area of CMP, so contributions would probably take more time to review than to implement ourselves. But if you want to help, an investigation into how it can be done (with some sample/demo code) will probably help us move it along faster.
To announce dynamic text that isn’t supported by AWT’s a11y, one idea was to use JBRs API: https://jetbrains.github.io/JetBrainsRuntimeApi/jetbrains.runtime.api/com/jetbrains/AccessibleAnnouncer.html
u
Thank you very much, I will report your response to my client (EthZurich) to see if they are interested in funding me to propose a fix for these problems.