Commit 4f03bd1d by Matjaz Gregoric

Remove redundant tabindex attr from buttons.

parent a798f589
...@@ -261,7 +261,7 @@ function DragAndDropTemplates(configuration) { ...@@ -261,7 +261,7 @@ function DragAndDropTemplates(configuration) {
h('div.keyboard-help-dialog', [ h('div.keyboard-help-dialog', [
h('div.modal-window-overlay'), h('div.modal-window-overlay'),
h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': labelledby_id, tabindex: -1}}, [ h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': labelledby_id, tabindex: -1}}, [
h('button.modal-dismiss-button.unbutton', {attributes: {tabindex: 1}}, [ h('button.modal-dismiss-button.unbutton', [
h('span.fa.fa-remove', {attributes: {'aria-hidden': true}}), h('span.fa.fa-remove', {attributes: {'aria-hidden': true}}),
h('span.sr', gettext('Close')) h('span.sr', gettext('Close'))
]), ]),
...@@ -321,8 +321,7 @@ function DragAndDropTemplates(configuration) { ...@@ -321,8 +321,7 @@ function DragAndDropTemplates(configuration) {
'button.unbutton.btn-default.btn-small', 'button.unbutton.btn-default.btn-small',
{ {
className: buttonClass, className: buttonClass,
disabled: options.disabled || options.spinner || false, disabled: options.disabled || options.spinner || false
attributes: {tabindex: 0}
}, },
[ [
h("span.btn-icon.fa", {className: iconClass, attributes: {"aria-hidden": true}}), h("span.btn-icon.fa", {className: iconClass, attributes: {"aria-hidden": true}}),
...@@ -755,7 +754,7 @@ function DragAndDropBlock(runtime, element, configuration) { ...@@ -755,7 +754,7 @@ function DragAndDropBlock(runtime, element, configuration) {
}; };
var focusModalButton = function() { var focusModalButton = function() {
$root.find('.keyboard-help-dialog .modal-dismiss-button ').focus(); $root.find('.keyboard-help-dialog .modal-dismiss-button').focus();
}; };
var showKeyboardHelp = function(evt) { var showKeyboardHelp = function(evt) {
......
...@@ -217,7 +217,6 @@ class TestDragAndDropRender(BaseIntegrationTest): ...@@ -217,7 +217,6 @@ class TestDragAndDropRender(BaseIntegrationTest):
self.scroll_down(250) self.scroll_down(250)
button = self._get_go_to_beginning_button() button = self._get_go_to_beginning_button()
self.assertEqual(button.get_attribute('tabindex'), '0')
# Button is only visible to screen reader users by default. # Button is only visible to screen reader users by default.
self.assertIn('sr', button.get_attribute('class').split()) self.assertIn('sr', button.get_attribute('class').split())
# Set focus to the element (cannot find a way to do this without execute_script). # Set focus to the element (cannot find a way to do this without execute_script).
......
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