Bug 208332

Summary: AX: accessibilityReplaceRange:withText: doesn't post an AXValueChanged notification like when typing with kb
Product: WebKit Reporter: Canhai Chen <canhai.chen>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: aboxhall, apinheiro, canhai.chen, cfleizach, commit-queue, dmazzoni, ews-watchlist, jcraig, jdiggs, mifenton, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
sample html with text fields
none
Patch
none
Patch none

Description Canhai Chen 2020-02-27 12:08:04 PST
Created attachment 391895 [details]
sample html with text fields

Summary:
When calling the replace with range API for a web textfield, VoiceOver does not get an AXValueChanged notification from the web area like it does when typing with the keyboard.

Steps To Reproduce:
1. Open a web page with a web textfield. (text.html)
2. Type in the first textfield with VO and a Braille display

Results:
VO gets a AXValueChanged notification for the textfield, and an AXSelectedTextChanged notification from the web area. These same notifications come in when typing with the keyboard. The difference is when typing with the keyboard, VO also gets an AXValueChanged notification from the web area. There should be a AXValueChanged notification since calling the API changes the value of the textfield.

Regression:
No
Comment 1 Canhai Chen 2020-02-27 12:09:01 PST
<rdar://problem/58489685>
Comment 2 Canhai Chen 2020-02-27 15:44:48 PST
Created attachment 391935 [details]
Patch
Comment 3 chris fleizach 2020-03-10 17:37:30 PDT
Comment on attachment 391935 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391935&action=review

> Source/WebCore/ChangeLog:9
> +        When accessibilityReplaceRange:withText: is called to insert or replace text, there should be an

should be "a"

> Source/WebCore/ChangeLog:10
> +        AXValueChanged notification posted with correct user info to notify the AX client that the text value

with "the" correct

> Source/WebCore/ChangeLog:11
> +        has been changed with detail info about the change.

detailed

> Source/WebCore/ChangeLog:13
> +        Post notification in Editor::replaceSelectionWithFragment for EditAction::Insert edit type 

Post "a"
Comment 4 Canhai Chen 2020-03-10 17:57:05 PDT
Created attachment 393195 [details]
Patch
Comment 5 WebKit Commit Bot 2020-03-11 18:22:16 PDT
Comment on attachment 393195 [details]
Patch

Clearing flags on attachment: 393195

Committed r258303: <https://trac.webkit.org/changeset/258303>
Comment 6 WebKit Commit Bot 2020-03-11 18:22:18 PDT
All reviewed patches have been landed.  Closing bug.