Recently, I found there are some problems with Voice Over on PWA app: Voice Over cannot read the state changes when users interacts with some HTML element. I am not sure this bug is a chromium bug or Voice Over bug. I have reported the bug to chromium, which list the reproduce steps and video.
I am working on the bug, but I don’t have much of an idea. So sending this here to see if you have some insight on this issue.
How to reproduce the bug
- Install PWA test app(https://pwa-a11-test.netlify.app)
- Open the PWA app
- Turn on the VoiceOver
- Pressing
Space
on the checkbox element
(Note: I only use checkbox element as a example, other HTML element also have the similar problem, such as Pressing Left/Right on slider element)
- Expected: Voice Over read the value changes, just like the behavior shown in the browser.
- Actual: Voice Over do nothing.
Chromium code analysis
The bug only exist in PWA scenario, it’s fine for browser scenario.
FYI, PWA Mac app has its own process(called app shim process), which spawn browser process(think it as Chrome app) and then communicate between them. For the accessibility implementation for PWA App, chromium use NSAccessibilityRemoteUIElement, a private Apple API, to make app shim process have the all accessibility ability of browser process. I doubt the bug has anything to do with NSAccessibilityRemoteUIElement https://source.chromium.org/chromium/chromium/src/+/main:ui/base/cocoa/remote_accessibility_api.h;l=14?q=NSAccessibilityRemoteUIElement&ss=chromium%2Fchromium%2Fsrc but I am not familiar with the undocumented API.
According to the chromium code, when pressing the Space
on checkbox, chromium will call NSAccessibilityPostNotification with NSAccessibilityValueChangedNotification. Voice Over can’t read the value change for PWA Mac app, but can read for browser scenario.
I use Xcode accessibility inspector tool to see the notification posted from PWA App. I found the notification was sent successfully, but Voice Over can not read it! So I doubt voice over is doing some check to disallow read it in this case?
Do you have any thoughts on this? Appreciate it if there is any comments or response!!