diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2018-09-26 15:23:56 +0200 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2018-09-26 16:18:41 +0200 |
| commit | fe4c3e0064e01ec2ac34e629408979b1a9c9eb7c (patch) | |
| tree | b3b780005593bca9bc341f8c52f2768b2c420613 /addons/web/static/src/js | |
| parent | 01abb0f2543fd18bf65c8d30e05e07297fc41ebe (diff) | |
[IMP] web: do not set accesskeys on buttons with tabindex=-1
It excludes a lot of 'noise' when we do not set automatically access keys to all
the skipped items, this allows a better focus on actions when using the keyboard.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome/keyboard_navigation_mixin.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js b/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js index 6fec5795bee..a8d95d57a79 100644 --- a/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js +++ b/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js @@ -121,7 +121,10 @@ odoo.define('web.KeyboardNavigationMixin', function (require) { var usedAccessKey = this._getAllUsedAccessKeys(); - var buttonsWithoutAccessKey = this.$el.find('button.btn:visible').not('[accesskey]').not('[disabled]'); + var buttonsWithoutAccessKey = this.$el.find('button.btn:visible') + .not('[accesskey]') + .not('[disabled]') + .not('[tabindex="-1"]'); _.each(buttonsWithoutAccessKey, function (elem) { var buttonString = [elem.innerText, elem.title, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"].join(''); for (var letterIndex = 0; letterIndex < buttonString.length; letterIndex++) { |
