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

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 2799413002: Views a11y: Add AXNodeData.actions bitfield to indicate supported actions by UI. (Closed)
Patch Set: Fix tests broken from rebase. Created 3 years, 7 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/accessibility/blink_ax_tree_source.h" 5 #include "content/renderer/accessibility/blink_ax_tree_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 ui::AX_ATTR_DESCRIBEDBY_IDS, descriptionObjects, dst); 425 ui::AX_ATTR_DESCRIBEDBY_IDS, descriptionObjects, dst);
426 } 426 }
427 427
428 if (src.ValueDescription().length()) { 428 if (src.ValueDescription().length()) {
429 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.ValueDescription().Utf8()); 429 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.ValueDescription().Utf8());
430 } else { 430 } else {
431 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.StringValue().Utf8()); 431 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.StringValue().Utf8());
432 } 432 }
433 433
434 if (src.CanSetValueAttribute()) 434 if (src.CanSetValueAttribute())
435 dst->AddBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE, true); 435 dst->AddAction(ui::AX_ACTION_SET_VALUE);
436 436
437 if (!src.Url().IsEmpty()) 437 if (!src.Url().IsEmpty())
438 dst->AddStringAttribute(ui::AX_ATTR_URL, src.Url().GetString().Utf8()); 438 dst->AddStringAttribute(ui::AX_ATTR_URL, src.Url().GetString().Utf8());
439 439
440 // The following set of attributes are only accessed when the accessibility 440 // The following set of attributes are only accessed when the accessibility
441 // mode is set to screen reader mode, otherwise only the more basic 441 // mode is set to screen reader mode, otherwise only the more basic
442 // attributes are populated. 442 // attributes are populated.
443 if (accessibility_mode_.has_mode(AccessibilityMode::kScreenReader)) { 443 if (accessibility_mode_.has_mode(AccessibilityMode::kScreenReader)) {
444 blink::WebString web_placeholder = src.Placeholder(nameFrom); 444 blink::WebString web_placeholder = src.Placeholder(nameFrom);
445 if (!web_placeholder.IsEmpty()) 445 if (!web_placeholder.IsEmpty())
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 return WebAXObject(); 890 return WebAXObject();
891 891
892 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); 892 WebDocument document = render_frame_->GetWebFrame()->GetDocument();
893 if (!document.IsNull()) 893 if (!document.IsNull())
894 return document.AccessibilityObject(); 894 return document.AccessibilityObject();
895 895
896 return WebAXObject(); 896 return WebAXObject();
897 } 897 }
898 898
899 } // namespace content 899 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698