Commit 9ca4ed23 authored by dbeam@chromium.org's avatar dbeam@chromium.org

a11y/options: Fix initial tab focus bug on supervised user history page.

R=dmazzoni@chromium.org
BUG=393489

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283666 0039d316-1c4b-4281-b951-d872f2087c98
parent 012d1317
...@@ -1703,7 +1703,7 @@ HistoryView.prototype.updateFocusableElements_ = function() { ...@@ -1703,7 +1703,7 @@ HistoryView.prototype.updateFocusableElements_ = function() {
this.currentVisits_.length > 0) { this.currentVisits_.length > 0) {
var firstVisit = this.currentVisits_[0]; var firstVisit = this.currentVisits_[0];
firstVisit.setIsLead(true); firstVisit.setIsLead(true);
if (firstVisit.checkBox) firstVisit.checkBox.tabIndex = 0; (firstVisit.checkBox || firstVisit.titleLink).tabIndex = 0;
} }
}; };
......
...@@ -777,6 +777,11 @@ TEST_F('HistoryWebUIRealBackendTest', 'basic', function() { ...@@ -777,6 +777,11 @@ TEST_F('HistoryWebUIRealBackendTest', 'basic', function() {
testDone(); testDone();
}); });
TEST_F('HistoryWebUIRealBackendTest', 'atLeastOneFocusable', function() {
assertEquals(1, document.querySelectorAll('[tabindex="0"]').length);
testDone();
});
/** /**
* Test individual deletion of history entries. * Test individual deletion of history entries.
*/ */
...@@ -862,6 +867,11 @@ TEST_F('HistoryWebUIDeleteProhibitedTest', 'deleteProhibited', function() { ...@@ -862,6 +867,11 @@ TEST_F('HistoryWebUIDeleteProhibitedTest', 'deleteProhibited', function() {
waitForCallback('deleteFailed', testDone); waitForCallback('deleteFailed', testDone);
}); });
TEST_F('HistoryWebUIDeleteProhibitedTest', 'atLeastOneFocusable', function() {
assertEquals(1, document.querySelectorAll('[tabindex="0"]').length);
testDone();
});
/** /**
* Fixture for History WebUI testing IDN. * Fixture for History WebUI testing IDN.
* @extends {BaseHistoryWebUITest} * @extends {BaseHistoryWebUITest}
......
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