Commit a6be98b1 authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

Fire name changed events when image annotations change.

We introduced two new accessibility attributes for image
annotations. When these attributes change, it's exposed to
assistive technology as part of the accessible name,
so we need to fire name changed events to guarantee that
AT is updated.

Bug: 905419

Change-Id: I63d64b895ccbfc3265f037de3227be3da4dc41dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504705
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638310}
parent ca7eff86
......@@ -209,9 +209,12 @@ void AXEventGenerator::OnStringAttributeChanged(AXTree* tree,
AddEvent(node, Event::LIVE_REGION_CREATED);
break;
case ax::mojom::StringAttribute::kAutoComplete:
LOG(ERROR) << "auto!";
AddEvent(node, Event::AUTO_COMPLETE_CHANGED);
break;
case ax::mojom::StringAttribute::kImageAnnotation:
// The image annotation is reported as part of the accessible name.
AddEvent(node, Event::NAME_CHANGED);
break;
default:
AddEvent(node, Event::OTHER_ATTRIBUTE_CHANGED);
break;
......@@ -247,6 +250,10 @@ void AXEventGenerator::OnIntAttributeChanged(AXTree* tree,
case ax::mojom::IntAttribute::kScrollY:
AddEvent(node, Event::SCROLL_POSITION_CHANGED);
break;
case ax::mojom::IntAttribute::kImageAnnotationStatus:
// The image annotation is reported as part of the accessible name.
AddEvent(node, Event::NAME_CHANGED);
break;
default:
AddEvent(node, Event::OTHER_ATTRIBUTE_CHANGED);
break;
......
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