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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/password_list_item.js

Issue 2818283002: MD-Settings: A11y - Fix password list focusability. (Closed)
Patch Set: nit 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/passwords_and_forms_page/password_list_item.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/password_list_item.js b/chrome/browser/resources/settings/passwords_and_forms_page/password_list_item.js
new file mode 100644
index 0000000000000000000000000000000000000000..688d934e0be2211127cbedb1cab88fe2f1e31935
--- /dev/null
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/password_list_item.js
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview PasswordListItem represents one row in the list of passwords.
+ * It needs to be its own component because FocusRowBehavior provides good a11y.
+ */
+
+Polymer({
+ is: 'password-list-item',
+
+ behaviors: [FocusRowBehavior],
+
+ properties: {
+ /**
+ * The password whose info should be displayed.
+ * @type {!chrome.passwordsPrivate.PasswordUiEntry}
+ */
+ item: Array,
+ },
+
+ /**
+ * Creates an empty password of specified length.
+ * @param {number} length
+ * @return {string} password
+ * @private
+ */
+ getEmptyPassword_: function(length) {
+ return ' '.repeat(length);
+ },
+
+ /**
+ * Opens the password action menu.
+ * @private
+ */
+ onPasswordMenuTap_: function() {
+ this.fire(
+ 'password-menu-tap', {target: this.$.passwordMenu, item: this.item});
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698