Bug 260191 - AX: NSApplicationAccessibilityFocusedUIElement is sometimes an ignored object which breaks functionality for Voice Control in Mail
Summary: AX: NSApplicationAccessibilityFocusedUIElement is sometimes an ignored object...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-14 21:24 PDT by Tyler Wilcock
Modified: 2023-08-15 10:37 PDT (History)
10 users (show)

See Also:


Attachments
Patch (9.02 KB, patch)
2023-08-14 21:36 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2023-08-14 21:24:58 PDT
...
Comment 1 Radar WebKit Bug Importer 2023-08-14 21:25:05 PDT
<rdar://problem/113888778>
Comment 2 Tyler Wilcock 2023-08-14 21:26:53 PDT
rdar://113689647
Comment 3 Tyler Wilcock 2023-08-14 21:36:46 PDT
Created attachment 467277 [details]
Patch
Comment 4 Andres Gonzalez 2023-08-15 07:44:38 PDT
(In reply to Tyler Wilcock from comment #3)
> Created attachment 467277 [details]
> Patch

diff --git a/LayoutTests/accessibility/editable-webpage-focused-ui-element.html b/LayoutTests/accessibility/editable-webpage-focused-ui-element.html
new file mode 100644
index 000000000000..893a3aad6d79
--- /dev/null
+++ b/LayoutTests/accessibility/editable-webpage-focused-ui-element.html

+    output += evalAndReturn("internals.setSelectionFromNone();");

Do we need evalAndReturn or you could just call internals.setSelectionFromNone?

+        // Wait for focus to sync to the <body> and update the AX tree as a result of setSelectionFromNone().
+        await sleep(100);

Can we make this deterministic with a waitFor? Waiting for hard-coded intervals often leads to flaky behaviors.
Comment 5 Tyler Wilcock 2023-08-15 10:01:41 PDT
(In reply to Andres Gonzalez from comment #4)
> (In reply to Tyler Wilcock from comment #3)
> > Created attachment 467277 [details]
> > Patch
> 
> diff --git
> a/LayoutTests/accessibility/editable-webpage-focused-ui-element.html
> b/LayoutTests/accessibility/editable-webpage-focused-ui-element.html
> new file mode 100644
> index 000000000000..893a3aad6d79
> --- /dev/null
> +++ b/LayoutTests/accessibility/editable-webpage-focused-ui-element.html
> 
> +    output += evalAndReturn("internals.setSelectionFromNone();");
> 
> Do we need evalAndReturn or you could just call
> internals.setSelectionFromNone?
> 
> +        // Wait for focus to sync to the <body> and update the AX tree as a
> result of setSelectionFromNone().
> +        await sleep(100);
> 
> Can we make this deterministic with a waitFor? Waiting for hard-coded
> intervals often leads to flaky behaviors.
Will address these in a follow-up, thanks.
Comment 6 EWS 2023-08-15 10:37:46 PDT
Committed 266917@main (30959c84f8ab): <https://commits.webkit.org/266917@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 467277 [details].