Commit 8f1a92f0 authored by dmazzoni's avatar dmazzoni Committed by Commit bot

Fix live regions on Mac OS X.

We were returning an empty string for AXARIALive for nodes
inside of a live region, and that was confusing VoiceOver.

BUG=440934

Review URL: https://codereview.chromium.org/795363002

Cr-Commit-Position: refs/heads/master@{#308029}
parent 8a61bd41
...@@ -475,6 +475,11 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaLive) { ...@@ -475,6 +475,11 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaLive) {
RunTest(FILE_PATH_LITERAL("aria-live.html")); RunTest(FILE_PATH_LITERAL("aria-live.html"));
} }
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
AccessibilityAriaLiveWithContent) {
RunTest(FILE_PATH_LITERAL("aria-live-with-content.html"));
}
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaLog) { IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaLog) {
RunTest(FILE_PATH_LITERAL("aria-log.html")); RunTest(FILE_PATH_LITERAL("aria-log.html"));
} }
......
...@@ -385,8 +385,10 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, ...@@ -385,8 +385,10 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src,
dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.liveRegionBusy()); dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.liveRegionBusy());
if (src.liveRegionBusy()) if (src.liveRegionBusy())
dst->state |= (1 << ui::AX_STATE_BUSY); dst->state |= (1 << ui::AX_STATE_BUSY);
dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS, if (!src.liveRegionStatus().isEmpty()) {
UTF16ToUTF8(src.liveRegionStatus())); dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS,
UTF16ToUTF8(src.liveRegionStatus()));
}
dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT, dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT,
UTF16ToUTF8(src.liveRegionRelevant())); UTF16ToUTF8(src.liveRegionRelevant()));
dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC,
......
AXWebArea
AXGroup AXSubrole=AXApplicationMarquee
AXStaticText AXValue='Off'
AXGroup AXSubrole=AXApplicationMarquee AXARIALive='polite'
AXStaticText AXValue='Polite'
AXGroup AXSubrole=AXApplicationMarquee AXARIALive='assertive'
AXStaticText AXValue='Assertive'
<!--
@MAC-ALLOW:AXSubrole*
@MAC-ALLOW-EMPTY:AXARIALive*
@WIN-ALLOW:live*
@WIN-ALLOW:container*
@WIN-ALLOW:BUSY*
-->
<!DOCTYPE html>
<html>
<body>
<div role="marquee" aria-live="off">
Off
</div>
<div role="marquee" aria-live="polite">
Polite
</div>
<div role="marquee" aria-live="assertive">
Assertive
</div>
</body>
</html>
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