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

Unified Diff: chrome/browser/resources/history/history.js

Issue 664863004: history: more VoiceOver enhancements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bookmarked Created 6 years, 2 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 | « chrome/browser/resources/history/history.html ('k') | chrome/browser/resources/history/other_devices.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index 6c18a61a5bd88413d3673a357f6123659fb06e2d..11ed0aeb3c2841af708547b0207d97a8c51dde92 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -187,7 +187,7 @@ Visit.prototype.getResultDOM = function(propertyBag) {
var entryBox = createElementWithClassName('div', 'entry-box');
var domain = createElementWithClassName('div', 'domain');
- this.id_ = this.model_.nextVisitId_++;
+ this.id_ = this.model_.getNextVisitId();
var self = this;
// Only create the checkbox if it can be used either to delete an entry or to
@@ -196,9 +196,13 @@ Visit.prototype.getResultDOM = function(propertyBag) {
var checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.id = 'checkbox-' + this.id_;
- checkbox.setAttribute('aria-label',
- loadTimeData.getString('removeFromHistory'));
checkbox.time = this.date.getTime();
+ checkbox.setAttribute('aria-label', loadTimeData.getStringF(
+ 'entrySummary',
+ this.dateTimeOfDay,
+ this.starred_ ? loadTimeData.getString('bookmarked') : '',
+ this.title_,
+ this.domain_));
checkbox.addEventListener('click', checkboxClicked);
entryBox.appendChild(checkbox);
@@ -743,6 +747,14 @@ HistoryModel.prototype.removeVisit = function(visit) {
this.visits_.splice(index, 1);
};
+/**
+ * Automatically generates a new visit ID.
+ * @return {number} The next visit ID.
+ */
+HistoryModel.prototype.getNextVisitId = function() {
+ return this.nextVisitId_++;
+};
+
// HistoryModel, Private: -----------------------------------------------------
/**
« no previous file with comments | « chrome/browser/resources/history/history.html ('k') | chrome/browser/resources/history/other_devices.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698