diff --git a/packages/menu-bar/src/vaadin-menu-bar-mixin.js b/packages/menu-bar/src/vaadin-menu-bar-mixin.js index 8d1a627dcc..d147dd0fe8 100644 --- a/packages/menu-bar/src/vaadin-menu-bar-mixin.js +++ b/packages/menu-bar/src/vaadin-menu-bar-mixin.js @@ -561,6 +561,8 @@ export const MenuBarMixin = (superClass) => button.className = item.className; } + button.disabled = item.disabled; + return button; } @@ -574,12 +576,6 @@ export const MenuBarMixin = (superClass) => } } - /** @protected */ - _setButtonDisabled(button, disabled) { - button.disabled = disabled; - button.setAttribute('tabindex', disabled ? '-1' : '0'); - } - /** @protected */ _setButtonTheme(btn, hostTheme) { let theme = hostTheme; @@ -629,7 +625,6 @@ export const MenuBarMixin = (superClass) => items.forEach((item) => { const button = this._initButton(item); this.insertBefore(button, this._overflow); - this._setButtonDisabled(button, item.disabled); this._initButtonAttrs(button); this._setButtonTheme(button, this._theme); });