From c7458a828673062aac232d2d91052ec38bf9d153 Mon Sep 17 00:00:00 2001 From: alokhyland Date: Tue, 30 Jan 2024 16:19:41 +0530 Subject: [PATCH] ELEMENTS-1714: make document actions kebab menu usable with keyboard only --- ui/widgets/nuxeo-actions-menu.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ui/widgets/nuxeo-actions-menu.js b/ui/widgets/nuxeo-actions-menu.js index 9b28843ae..fccd8e5c7 100644 --- a/ui/widgets/nuxeo-actions-menu.js +++ b/ui/widgets/nuxeo-actions-menu.js @@ -88,7 +88,13 @@ import './nuxeo-tooltip.js';
- + { + dropDownList.map((list) => list.removeAttribute('tabindex')); + }, 0); + } + } + + listnerRemove() { + this.removeEventListener('keydown', this._removeTabIndex.bind(this)); + } + _moveToDropdown(el) { el.slot = 'dropdown'; + el.addEventListener('keydown', this._removeTabIndex.bind(this)); /** * XXX: in Chrome 100+, for some unknown reason, when moving action buttons to the dropdown menu * and setting its visibility, messes up with any dialog that might be opened from clicking @@ -209,6 +229,7 @@ import './nuxeo-tooltip.js'; */ setTimeout(() => { el.setAttribute('show-label', ''); + el.removeAttribute('tabindex'); }, 0); }