Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: components/html_viewer/ax_provider_impl.cc

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with ariaTextAlternative Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/html_viewer/ax_provider_impl.cc
diff --git a/components/html_viewer/ax_provider_impl.cc b/components/html_viewer/ax_provider_impl.cc
index ecb69b47f2743d388bf79f5d040ff8a00f688fa0..8ef9ae78226a68fb516302b1926a1d58e2dd11ad 100644
--- a/components/html_viewer/ax_provider_impl.cc
+++ b/components/html_viewer/ax_provider_impl.cc
@@ -81,10 +81,12 @@ AxNodePtr AxProviderImpl::ConvertAxNode(const WebAXObject& ax_object,
if (ax_object.isAnchor()) {
result->link = mojo::AxLink::New();
result->link->url = String::From(ax_object.url().string());
- } else if (ax_object.childCount() == 0 &&
- !ax_object.stringValue().isEmpty()) {
- result->text = mojo::AxText::New();
- result->text->content = String::From(ax_object.stringValue());
+ } else if (ax_object.childCount() == 0) {
+ blink::WebString name = ax_object.name();
+ if (!name.isEmpty()) {
+ result->text = mojo::AxText::New();
+ result->text->content = String::From(name);
+ }
}
return result.Pass();

Powered by Google App Engine
This is Rietveld 408576698