Commit 54249ff5 authored by dbeam's avatar dbeam Committed by Commit bot

history: break <label> relationship between time and delete checkbox.

Clicking anywhere in an entry already toggles the checkbox and this was
just messing up VoiceOver spoken feedback.

Also add aria-label to satisfy a11y audit and make voice feedback better.

R=dmazzoni@chromium.org
BUG=385344

Review URL: https://codereview.chromium.org/661043006

Cr-Commit-Position: refs/heads/master@{#300282}
parent d8e1571c
...@@ -183,7 +183,7 @@ Visit.prototype.getResultDOM = function(propertyBag) { ...@@ -183,7 +183,7 @@ Visit.prototype.getResultDOM = function(propertyBag) {
var useMonthDate = propertyBag.useMonthDate || false; var useMonthDate = propertyBag.useMonthDate || false;
var focusless = propertyBag.focusless || false; var focusless = propertyBag.focusless || false;
var node = createElementWithClassName('li', 'entry'); var node = createElementWithClassName('li', 'entry');
var time = createElementWithClassName('label', 'time'); var time = createElementWithClassName('span', 'time');
var entryBox = createElementWithClassName('div', 'entry-box'); var entryBox = createElementWithClassName('div', 'entry-box');
var domain = createElementWithClassName('div', 'domain'); var domain = createElementWithClassName('div', 'domain');
...@@ -196,9 +196,10 @@ Visit.prototype.getResultDOM = function(propertyBag) { ...@@ -196,9 +196,10 @@ Visit.prototype.getResultDOM = function(propertyBag) {
var checkbox = document.createElement('input'); var checkbox = document.createElement('input');
checkbox.type = 'checkbox'; checkbox.type = 'checkbox';
checkbox.id = 'checkbox-' + this.id_; checkbox.id = 'checkbox-' + this.id_;
checkbox.setAttribute('aria-label',
loadTimeData.getString('removeFromHistory'));
checkbox.time = this.date.getTime(); checkbox.time = this.date.getTime();
checkbox.addEventListener('click', checkboxClicked); checkbox.addEventListener('click', checkboxClicked);
time.setAttribute('for', checkbox.id);
entryBox.appendChild(checkbox); entryBox.appendChild(checkbox);
if (focusless) if (focusless)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment