Repository navigation
Commit 17042b9
OLYM-9850: [macOS] A disabled control is still read by VoiceOver, as dimmed
With the restriction from upstream flutter#190353 in place, a disabled button or
checkbox reached macOS with no role, no name and no AXEnabled: VoiceOver
found an empty element where the control was.
-[AXPlatformNodeCocoa isAccessibilitySelectorAllowed:] returned NO for every
selector on a node whose restriction is kDisabled. AppKit asks it for every
accessibility method this class implements, the getters included
(accessibilityRole, accessibilityLabel, isAccessibilityEnabled), so it hid
the whole element. Upstream master has the same code, so upstream's fix has
the same effect on a real Mac; its tests call the getters directly, which
skips AppKit's check.
Fix: a disabled node refuses only the setters and the accessibilityPerform
actions, like a disabled AppKit control, and is read as before. VoiceOver
then reads "Ignore untagged faces, dimmed, button" and "Info, dimmed,
checked, checkbox".
Test: FlutterPlatformNodeDelegateMac.DisabledControlsAreNotAccessibilityEnabled
now also checks which selectors a disabled button allows. UPSTREAM-CANDIDATES.md
entry 14.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent aa73c70 commit 17042b9
3 files changed
Lines changed: 55 additions & 5 deletions
File tree
- engine/src/flutter
- shell/platform/darwin/macos/framework/Source
- third_party/accessibility/ax/platform
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
253 | 278 | | |
254 | 279 | | |
255 | 280 | | |
| |||
290 | 315 | | |
291 | 316 | | |
292 | 317 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
296 | 321 | | |
297 | 322 | | |
298 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
| |||
536 | 540 | | |
537 | 541 | | |
538 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
539 | 551 | | |
540 | 552 | | |
541 | 553 | | |
| |||
548 | 560 | | |
549 | 561 | | |
550 | 562 | | |
| 563 | + | |
551 | 564 | | |
552 | 565 | | |
553 | 566 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
819 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
820 | 832 | | |
821 | 833 | | |
822 | 834 | | |
| |||
0 commit comments