Commit 521309fe authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Restore live region changed events for processing by JAWS focus mode

The live region changed events are needed by current versions of JAWS,
which do not process the text inserted events fired by Chrome in all
modes. Specifically, current versions of JAWS processes text inserted
events in virtual cursor mode but not in focus mode. This may change
in future versions of JAWS, and so at some point the live region
changed events may truly become redundant with the text inserted events.

NOTRY=true

Bug: 878929
Change-Id: I3286c84d1d6366735a38af19e68f4c526658b68b
Reviewed-on: https://chromium-review.googlesource.com/1211508
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589412}
parent a9e207ba
......@@ -179,10 +179,18 @@ void BrowserAccessibilityManagerWin::FireGeneratedEvent(
FireWinAccessibilityEvent(EVENT_OBJECT_REORDER, node);
break;
case Event::LIVE_REGION_CHANGED:
// NVDA and JAWS are inconsistent about speaking this event in content.
// Because of this, and because Firefox does not currently fire it, we
// are avoiding this event for now.
// FireWinAccessibilityEvent(EVENT_OBJECT_LIVEREGIONCHANGED, node);
// This event is redundant with the IA2_EVENT_TEXT_INSERTED events;
// however, JAWS 2018 and earlier do not process the text inserted
// events when "virtual cursor mode" is turned off (Insert+Z).
// Fortunately, firing the redudant event does not cause duplicate
// verbalizations in either screen reader.
// Future versions of JAWS may process the text inserted event when
// in focus mode, and so at some point the live region
// changed events may truly become redundant with the text inserted
// events. Note: Firefox does not fire this event, but JAWS processes
// Firefox live region events differently (utilizes MSAA's
// EVENT_OBJECT_SHOW).
FireWinAccessibilityEvent(EVENT_OBJECT_LIVEREGIONCHANGED, node);
break;
case Event::LOAD_COMPLETE:
FireWinAccessibilityEvent(IA2_EVENT_DOCUMENT_LOAD_COMPLETE, node);
......
EVENT_OBJECT_LIVEREGIONCHANGED on <div#live> role=DIV
EVENT_OBJECT_REORDER on <div#live> role=DIV
EVENT_OBJECT_SHOW on <p> role=P
IA2_EVENT_TEXT_INSERTED on <div#live> role=DIV new_text={'<obj>' start=6 end=7}
EVENT_OBJECT_LIVEREGIONCHANGED on <div#live> role=DIV
IA2_EVENT_TEXT_INSERTED on <div#live> role=DIV new_text={'After' start=0 end=5}
IA2_EVENT_TEXT_REMOVED on <div#live> role=DIV old_text={'Before' start=0 end=6}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment