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

Unified Diff: views/controls/button/native_button.cc

Issue 1102006: Add Accessibility name for native buttons. (Closed)
Patch Set: Add Accessibility for Native Buttons Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/button/checkbox.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/native_button.cc
diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc
index 5bdc9c739c411f6efe10ccae21894b53ce2fe6dc..7890ee61248748b18e1dfa0c6e57aca1bee2bffe 100644
--- a/views/controls/button/native_button.cc
+++ b/views/controls/button/native_button.cc
@@ -77,6 +77,9 @@ void NativeButton::SetLabel(const std::wstring& label) {
if (native_wrapper_)
native_wrapper_->UpdateLabel();
+
+ // Update the accessible name whenever the label changes.
+ SetAccessibleName(label);
}
void NativeButton::SetIsDefault(bool is_default) {
« no previous file with comments | « views/controls/button/checkbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698