Skip to content

Commit 1e42a8e

Browse files
joanmarieChromium LUCI CQ
authored and
Chromium LUCI CQ
committed
Remove SetAssociatedLabel functions; use View::SetAccessibleName instead
View::SetAccessibleName can be called with a labelling view and does the very same work that several views' SetAssociatedLabel does. * Remove SetAssociatedLabel from EditableCombobox, which has no callers * Remove SetAssociatedLabel from Textfield, and Checkbox and replace all uses with SetAccessibleName AX-Relnotes: n/a Bug: 1406781, 1363612 Change-Id: Ib0e64227eb02c5e5a77285308b06d22a990f7523 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4370264 Reviewed-by: Allen Bauer <kylixrd@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com> Cr-Commit-Position: refs/heads/main@{#1123094}
1 parent d5ac0f7 commit 1e42a8e

29 files changed

+145
-64
lines changed

chrome/browser/ash/notifications/request_system_proxy_credentials_view.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void RequestSystemProxyCredentialsView::Init() {
159159
username_textfield_ =
160160
auth_container->AddChildView(std::make_unique<views::Textfield>());
161161
username_textfield_->SetEnabled(true);
162-
username_textfield_->SetAssociatedLabel(username_label);
162+
username_textfield_->SetAccessibleName(username_label);
163163

164164
const int related_vertical_spacing =
165165
provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL);
@@ -173,7 +173,7 @@ void RequestSystemProxyCredentialsView::Init() {
173173
password_textfield_ = auth_container->AddChildView(
174174
std::make_unique<chromeos::PassphraseTextfield>());
175175
password_textfield_->SetEnabled(true);
176-
password_textfield_->SetAssociatedLabel(password_label);
176+
password_textfield_->SetAccessibleName(password_label);
177177
auth_container->AddPaddingRow(views::TableLayout::kFixedSize,
178178
related_vertical_spacing);
179179

chrome/browser/ash/notifications/request_system_proxy_credentials_view_unittest.cc

+44
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
#include "base/strings/utf_string_conversions.h"
1414
#include "chrome/browser/ui/browser.h"
1515
#include "chrome/browser/ui/browser_dialogs.h"
16+
#include "chrome/grit/generated_resources.h"
1617
#include "chrome/test/base/browser_with_test_window_test.h"
18+
#include "ui/base/l10n/l10n_util.h"
1719
#include "ui/views/controls/label.h"
1820
#include "ui/views/controls/textfield/textfield.h"
1921

@@ -114,4 +116,46 @@ TEST_F(RequestSystemProxyCredentialsViewTest, ErrorLabelVisible) {
114116
EXPECT_TRUE(system_proxy_dialog_->error_label_for_testing()->GetVisible());
115117
}
116118

119+
TEST_F(RequestSystemProxyCredentialsViewTest, TextfieldAccessibility) {
120+
CreateDialog(/*show_error=*/false);
121+
122+
ui::AXNodeData username_data;
123+
auto* username_field = system_proxy_dialog_->username_textfield_for_testing();
124+
username_field->GetAccessibleNodeData(&username_data);
125+
EXPECT_EQ(username_data.role, ax::mojom::Role::kTextField);
126+
EXPECT_EQ(username_field->GetAccessibleRole(), ax::mojom::Role::kTextField);
127+
EXPECT_EQ(
128+
username_data.GetString16Attribute(ax::mojom::StringAttribute::kName),
129+
l10n_util::GetStringUTF16(IDS_SYSTEM_PROXY_AUTH_DIALOG_USERNAME_LABEL));
130+
EXPECT_EQ(
131+
username_field->GetAccessibleName(),
132+
l10n_util::GetStringUTF16(IDS_SYSTEM_PROXY_AUTH_DIALOG_USERNAME_LABEL));
133+
EXPECT_EQ(username_data.GetNameFrom(), ax::mojom::NameFrom::kRelatedElement);
134+
EXPECT_TRUE(username_data.HasIntListAttribute(
135+
ax::mojom::IntListAttribute::kLabelledbyIds));
136+
EXPECT_TRUE(username_data.HasState(ax::mojom::State::kEditable));
137+
EXPECT_FALSE(username_data.HasState(ax::mojom::State::kProtected));
138+
EXPECT_EQ(username_data.GetDefaultActionVerb(),
139+
ax::mojom::DefaultActionVerb::kActivate);
140+
141+
ui::AXNodeData password_data;
142+
auto* password_field = system_proxy_dialog_->password_textfield_for_testing();
143+
password_field->GetAccessibleNodeData(&password_data);
144+
EXPECT_EQ(password_data.role, ax::mojom::Role::kTextField);
145+
EXPECT_EQ(password_field->GetAccessibleRole(), ax::mojom::Role::kTextField);
146+
EXPECT_EQ(
147+
password_data.GetString16Attribute(ax::mojom::StringAttribute::kName),
148+
l10n_util::GetStringUTF16(IDS_SYSTEM_PROXY_AUTH_DIALOG_PASSWORD_LABEL));
149+
EXPECT_EQ(
150+
password_field->GetAccessibleName(),
151+
l10n_util::GetStringUTF16(IDS_SYSTEM_PROXY_AUTH_DIALOG_PASSWORD_LABEL));
152+
EXPECT_EQ(password_data.GetNameFrom(), ax::mojom::NameFrom::kRelatedElement);
153+
EXPECT_TRUE(password_data.HasIntListAttribute(
154+
ax::mojom::IntListAttribute::kLabelledbyIds));
155+
EXPECT_TRUE(password_data.HasState(ax::mojom::State::kEditable));
156+
EXPECT_TRUE(password_data.HasState(ax::mojom::State::kProtected));
157+
EXPECT_EQ(password_data.GetDefaultActionVerb(),
158+
ax::mojom::DefaultActionVerb::kActivate);
159+
}
160+
117161
} // namespace ash

chrome/browser/enterprise/connectors/analysis/content_analysis_dialog.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void ContentAnalysisDialog::AddJustificationTextAreaToDialog() {
917917

918918
bypass_justification_ =
919919
contents_layout_->AddChildView(std::make_unique<views::Textarea>());
920-
bypass_justification_->SetAssociatedLabel(justification_text_label_);
920+
bypass_justification_->SetAccessibleName(justification_text_label_);
921921
bypass_justification_->SetController(this);
922922
}
923923

chrome/browser/enterprise/connectors/analysis/content_analysis_dialog_browsertest.cc

+39
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
#include "components/enterprise/common/proto/connectors.pb.h"
2626
#include "components/prefs/scoped_user_pref_update.h"
2727
#include "content/public/test/browser_test.h"
28+
#include "ui/accessibility/ax_node_data.h"
2829
#include "ui/base/l10n/l10n_util.h"
2930
#include "ui/base/resource/resource_bundle.h"
31+
#include "ui/views/accessibility/view_accessibility.h"
3032
#include "ui/views/controls/image_view.h"
3133
#include "ui/views/controls/textarea/textarea.h"
3234
#include "ui/views/controls/throbber.h"
@@ -1049,6 +1051,43 @@ IN_PROC_BROWSER_TEST_F(ContentAnalysisDialogPlainTests,
10491051
EXPECT_EQ(1, times_discard_called_);
10501052
}
10511053

1054+
IN_PROC_BROWSER_TEST_F(ContentAnalysisDialogPlainTests,
1055+
BypassJustificationLabelAndTextareaAccessibility) {
1056+
enterprise_connectors::ContentAnalysisDialog::
1057+
SetMinimumPendingDialogTimeForTesting(base::Milliseconds(0));
1058+
std::unique_ptr<MockDelegate> delegate = std::make_unique<MockDelegate>();
1059+
delegate->SetBypassRequiresJustification(true);
1060+
ContentAnalysisDialog* dialog = CreateContentAnalysisDialog(
1061+
std::move(delegate), FinalContentAnalysisResult::SUCCESS);
1062+
dialog->ShowResult(FinalContentAnalysisResult::WARNING);
1063+
1064+
// We need the label and its `AXNodeData` to verify that the textarea's name
1065+
// matches the name of the label, and that the textarea's labelledby id is
1066+
// the accessible id of the label.
1067+
auto* label = dialog->GetBypassJustificationLabelForTesting();
1068+
EXPECT_TRUE(label);
1069+
ui::AXNodeData label_data;
1070+
label->GetViewAccessibility().GetAccessibleNodeData(&label_data);
1071+
1072+
auto* textarea = dialog->GetBypassJustificationTextareaForTesting();
1073+
EXPECT_TRUE(textarea);
1074+
ui::AXNodeData textarea_data;
1075+
textarea->GetViewAccessibility().GetAccessibleNodeData(&textarea_data);
1076+
EXPECT_EQ(textarea_data.role, ax::mojom::Role::kTextField);
1077+
EXPECT_EQ(textarea->GetAccessibleRole(), ax::mojom::Role::kTextField);
1078+
EXPECT_EQ(
1079+
textarea_data.GetString16Attribute(ax::mojom::StringAttribute::kName),
1080+
label->GetAccessibleName());
1081+
EXPECT_EQ(textarea_data.GetNameFrom(), ax::mojom::NameFrom::kRelatedElement);
1082+
EXPECT_EQ(textarea_data.GetIntListAttribute(
1083+
ax::mojom::IntListAttribute::kLabelledbyIds)[0],
1084+
label_data.id);
1085+
EXPECT_TRUE(textarea_data.HasState(ax::mojom::State::kEditable));
1086+
EXPECT_FALSE(textarea_data.HasState(ax::mojom::State::kProtected));
1087+
EXPECT_EQ(textarea_data.GetDefaultActionVerb(),
1088+
ax::mojom::DefaultActionVerb::kActivate);
1089+
}
1090+
10521091
class ContentAnalysysDialogUiTest
10531092
: public DialogBrowserTest,
10541093
public testing::WithParamInterface<std::tuple<bool, bool, bool>> {

chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class UninstallCheckboxView : public views::View,
8888
.AddRows(1, views::TableLayout::kFixedSize);
8989

9090
auto checkbox = std::make_unique<views::Checkbox>();
91-
checkbox->SetAssociatedLabel(label.get());
91+
checkbox->SetAccessibleName(label.get());
9292
checkbox_targeter_ = std::make_unique<CheckboxTargeter>();
9393
checkbox->SetEventTargeter(
9494
std::make_unique<views::ViewTargeter>(checkbox_targeter_.get()));

chrome/browser/ui/views/autofill/payments/card_unmask_otp_input_dialog_views.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void CardUnmaskOtpInputDialogViews::ShowInvalidState(
8282
otp_input_textfield_invalid_label_->SetVisible(true);
8383
otp_input_textfield_invalid_label_->SetText(invalid_label_text);
8484
otp_input_textfield_invalid_label_padding_->SetVisible(false);
85-
otp_input_textfield_->SetAssociatedLabel(otp_input_textfield_invalid_label_);
85+
otp_input_textfield_->SetAccessibleName(otp_input_textfield_invalid_label_);
8686
}
8787

8888
void CardUnmaskOtpInputDialogViews::Dismiss(
@@ -256,7 +256,7 @@ void CardUnmaskOtpInputDialogViews::HideInvalidState() {
256256
otp_input_textfield_->SetInvalid(false);
257257
otp_input_textfield_invalid_label_->SetText(std::u16string());
258258
otp_input_textfield_invalid_label_->SetVisible(false);
259-
otp_input_textfield_->SetAssociatedLabel(otp_input_textfield_invalid_label_);
259+
otp_input_textfield_->SetAccessibleName(otp_input_textfield_invalid_label_);
260260
otp_input_textfield_invalid_label_padding_->SetVisible(true);
261261
}
262262

chrome/browser/ui/views/autofill/payments/migratable_card_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ MigratableCardView::GetMigratableCardDescriptionView(
121121
// format.
122122
views::InkDrop::Get(checkbox_)->SetMode(
123123
views::InkDropHost::InkDropMode::OFF);
124-
checkbox_->SetAssociatedLabel(card_description.get());
124+
checkbox_->SetAccessibleName(card_description.get());
125125
}
126126
break;
127127
}

chrome/browser/ui/views/bluetooth_device_credentials_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void BluetoothDeviceCredentialsView::InitControls(
145145
passkey_text_->SetDefaultWidthInChars(kDefaultTextfieldNumChars);
146146
passkey_text_->SetMinimumWidthInChars(kMinimumTextfieldNumChars);
147147
passkey_text_->SetTextInputType(ui::TEXT_INPUT_TYPE_TEXT);
148-
passkey_text_->SetAssociatedLabel(passkey_prompt_label_ptr);
148+
passkey_text_->SetAccessibleName(passkey_prompt_label_ptr);
149149
// TODO(cmumford): Windows Narrator says "no item in view".
150150
}
151151

chrome/browser/ui/views/cookie_info_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ views::Textfield* CookieInfoView::AddTextfieldRow(views::TableLayout* layout,
179179
l10n_util::GetStringUTF16(label_message_id)));
180180
auto* textfield = contents()->AddChildView(
181181
std::make_unique<GestureScrollableTextfield>(this));
182-
textfield->SetAssociatedLabel(label);
182+
textfield->SetAccessibleName(label);
183183
textfield->SetReadOnly(true);
184184
textfield->SetBorder(views::NullBorder());
185185

chrome/browser/ui/views/crypto_module_password_dialog_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void CryptoModulePasswordDialogView::Init(const std::string& hostname,
125125
password_container->AddChildView(std::make_unique<views::Textfield>());
126126
password_entry_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
127127
password_entry_->set_controller(this);
128-
password_entry_->SetAssociatedLabel(password_label_);
128+
password_entry_->SetAccessibleName(password_label_);
129129
password_container->SetFlexForView(password_entry_, 1);
130130
}
131131

chrome/browser/ui/views/login_view.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ LoginView::LoginView(const std::u16string& authority,
7777
views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY));
7878
username_field_ =
7979
fields_container->AddChildView(std::make_unique<views::Textfield>());
80-
username_field_->SetAssociatedLabel(username_label);
80+
username_field_->SetAccessibleName(username_label);
8181
auto* password_label =
8282
fields_container->AddChildView(std::make_unique<views::Label>(
8383
l10n_util::GetStringUTF16(IDS_LOGIN_DIALOG_PASSWORD_FIELD),
8484
views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY));
8585
password_field_ =
8686
fields_container->AddChildView(std::make_unique<views::Textfield>());
87-
password_field_->SetAssociatedLabel(password_label);
87+
password_field_->SetAccessibleName(password_label);
8888
password_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
8989

9090
if (http_auth_manager_) {

chrome/browser/ui/views/notifications/request_pin_view_chromeos.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void RequestPinView::Init() {
178178
textfield_ = AddChildView(std::make_unique<chromeos::PassphraseTextfield>());
179179
textfield_->set_controller(this);
180180
textfield_->SetEnabled(true);
181-
textfield_->SetAssociatedLabel(header_label_);
181+
textfield_->SetAccessibleName(header_label_);
182182
textfield_->SetDefaultWidthInChars(kDefaultTextWidthChars);
183183

184184
// Error label.

chrome/browser/ui/views/passwords/password_save_unsynced_credentials_locally_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void PasswordSaveUnsyncedCredentialsLocallyView::CreateLayout() {
100100
checkbox->SetChecked(true);
101101
num_selected_checkboxes_++;
102102
auto* username_label = row_view->AddChildView(CreateUsernameLabel(form));
103-
checkbox->SetAssociatedLabel(username_label);
103+
checkbox->SetAccessibleName(username_label);
104104
auto* password_label = row_view->AddChildView(CreatePasswordLabel(form));
105105
auto* row_layout =
106106
row_view->SetLayoutManager(std::make_unique<views::BoxLayout>(

chrome/browser/ui/views/webauthn/authenticator_client_pin_entry_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class PinTextfield : public views::Textfield {
3434
SetDefaultWidthInChars(20);
3535

3636
set_controller(controller);
37-
SetAssociatedLabel(label);
37+
SetAccessibleName(label);
3838
}
3939
PinTextfield(const PinTextfield&) = delete;
4040
PinTextfield& operator=(const PinTextfield&) = delete;

ui/views/accessibility/view_ax_platform_node_delegate_win_unittest.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ TEST_F(ViewAXPlatformNodeDelegateWinTest, TextfieldAssociatedLabel) {
151151
Label* label = new Label(u"Label");
152152
content->AddChildView(label);
153153
Textfield* textfield = new Textfield;
154-
textfield->SetAssociatedLabel(label);
154+
textfield->SetAccessibleName(label);
155155
content->AddChildView(textfield);
156156

157157
ComPtr<IAccessible> content_accessible(content->GetNativeViewAccessible());

ui/views/bubble/bubble_dialog_model_host.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ class CheckboxControl : public Checkbox {
169169
DISTANCE_RELATED_LABEL_HORIZONTAL));
170170
layout->set_cross_axis_alignment(BoxLayout::CrossAxisAlignment::kStart);
171171

172-
SetAssociatedLabel(label.get());
172+
// TODO(accessibility): There is no `SetAccessibilityProperties` which takes
173+
// a labelling view to set the accessible name.
174+
SetAccessibleName(label.get());
173175

174176
AddChildView(std::move(label));
175177
}

ui/views/controls/button/checkbox.cc

-14
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,6 @@ bool Checkbox::GetMultiLine() const {
128128
return label()->GetMultiLine();
129129
}
130130

131-
void Checkbox::SetAssociatedLabel(View* labelling_view) {
132-
DCHECK(labelling_view);
133-
GetViewAccessibility().OverrideLabelledBy(labelling_view);
134-
ui::AXNodeData node_data;
135-
labelling_view->GetAccessibleNodeData(&node_data);
136-
// Labelled-by relations are not common practice in native UI, so we also
137-
// set the checkbox accessible name for ATs which don't support that.
138-
// TODO(aleventhal) automatically handle setting the name from the related
139-
// label in ViewAccessibility and have it update the name if the text of the
140-
// associated label changes.
141-
SetAccessibleName(
142-
node_data.GetString16Attribute(ax::mojom::StringAttribute::kName));
143-
}
144-
145131
void Checkbox::SetCheckedIconImageColor(SkColor color) {
146132
checked_icon_image_color_ = color;
147133
}

ui/views/controls/button/checkbox.h

-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ class VIEWS_EXPORT Checkbox : public LabelButton {
4545
void SetMultiLine(bool multi_line);
4646
bool GetMultiLine() const;
4747

48-
// If the accessible name should be the same as the labelling view's text,
49-
// use this. It will set the accessible label relationship and copy the
50-
// accessible name from the labelling views's accessible name. Any view with
51-
// an accessible name can be used, e.g. a Label, StyledLabel or Link.
52-
void SetAssociatedLabel(View* labelling_view);
53-
5448
void SetCheckedIconImageColor(SkColor color);
5549

5650
// LabelButton:

ui/views/controls/button/checkbox_unittest.cc

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "base/strings/utf_string_conversions.h"
1212
#include "ui/accessibility/ax_enums.mojom.h"
1313
#include "ui/accessibility/ax_node_data.h"
14+
#include "ui/views/accessibility/view_accessibility.h"
1415
#include "ui/views/controls/styled_label.h"
1516
#include "ui/views/test/views_test_base.h"
1617

@@ -57,13 +58,22 @@ TEST_F(CheckboxTest, AccessibilityTest) {
5758
const std::u16string label_text = u"Some label";
5859
StyledLabel label;
5960
label.SetText(label_text);
60-
checkbox()->SetAssociatedLabel(&label);
61+
checkbox()->SetAccessibleName(&label);
62+
63+
// Use `ViewAccessibility::GetAccessibleNodeData` so that we can get the
64+
// label's accessible id to compare with the checkbox's labelled-by id.
65+
ui::AXNodeData label_data;
66+
label.GetViewAccessibility().GetAccessibleNodeData(&label_data);
6167

6268
ui::AXNodeData ax_data;
6369
checkbox()->GetAccessibleNodeData(&ax_data);
6470
EXPECT_EQ(ax_data.GetString16Attribute(ax::mojom::StringAttribute::kName),
6571
label_text);
6672
EXPECT_EQ(checkbox()->GetAccessibleName(), label_text);
73+
EXPECT_EQ(ax_data.GetNameFrom(), ax::mojom::NameFrom::kRelatedElement);
74+
EXPECT_EQ(ax_data.GetIntListAttribute(
75+
ax::mojom::IntListAttribute::kLabelledbyIds)[0],
76+
label_data.id);
6777
EXPECT_EQ(ax_data.role, ax::mojom::Role::kCheckBox);
6878
EXPECT_EQ(checkbox()->GetAccessibleRole(), ax::mojom::Role::kCheckBox);
6979
EXPECT_EQ(ax_data.GetCheckedState(), ax::mojom::CheckedState::kFalse);

ui/views/controls/editable_combobox/editable_combobox.cc

-4
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ void EditableCombobox::OnAccessibleNameChanged(const std::u16string& new_name) {
437437
}
438438
}
439439

440-
void EditableCombobox::SetAssociatedLabel(View* labelling_view) {
441-
textfield_->SetAssociatedLabel(labelling_view);
442-
}
443-
444440
void EditableCombobox::SetMenuDecorationStrategy(
445441
std::unique_ptr<MenuDecorationStrategy> strategy) {
446442
DCHECK(menu_model_);

ui/views/controls/editable_combobox/editable_combobox.h

-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ class VIEWS_EXPORT EditableCombobox
107107
// Selects the specified logical text range for the textfield.
108108
void SelectRange(const gfx::Range& range);
109109

110-
// Sets the associated label; use this instead of SetAccessibleName if there
111-
// is a label associated with this combobox.
112-
void SetAssociatedLabel(View* labelling_view);
113-
114110
protected:
115111
// Sets the menu decoration strategy. Setting it triggers an update to the
116112
// menu.

ui/views/controls/textfield/textfield.cc

-5
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,6 @@ Textfield::~Textfield() {
273273
}
274274
}
275275

276-
void Textfield::SetAssociatedLabel(View* labelling_view) {
277-
DCHECK(labelling_view);
278-
GetViewAccessibility().OverrideLabelledBy(labelling_view);
279-
}
280-
281276
void Textfield::SetController(TextfieldController* controller) {
282277
controller_ = controller;
283278
}

ui/views/controls/textfield/textfield.h

-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class ScopedPasswordInputEnabler;
5959

6060
namespace views {
6161

62-
class Label;
6362
class MenuRunner;
6463
class TextfieldController;
6564
class ViewsTextServicesContextMenu;
@@ -304,12 +303,6 @@ class VIEWS_EXPORT Textfield : public View,
304303
// Clears Edit history.
305304
void ClearEditHistory();
306305

307-
// If the accessible name should be the same as the labelling view's text,
308-
// use this. It will set the accessible label relationship and copy the
309-
// accessible name from the labelling views's accessible name. Any view with
310-
// an accessible name can be used, typically a Label, StyledLabel or Link.
311-
void SetAssociatedLabel(View* labelling_view);
312-
313306
// Set extra spacing placed between glyphs; used for obscured text styling.
314307
void SetObscuredGlyphSpacing(int spacing);
315308

0 commit comments

Comments
 (0)