Skip to content

Commit 0fcd8b1

Browse files
committed
rename feature flag, update JSDoc
1 parent a0fe14e commit 0fcd8b1

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

packages/menu-bar/src/vaadin-menu-bar-mixin.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,17 @@ export declare class MenuBarMixinClass {
103103
* #### Disabled items
104104
*
105105
* When an item is disabled, it prevents any user interaction with it, such as
106-
* focusing, clicking, or opening a sub-menu.
106+
* focusing, clicking, opening a sub-menu, etc. The item is also removed from the
107+
* tab order, which may negatively impact accessibility.
107108
*
108109
* To improve accessibility, disabled root-level items (menu bar buttons) can be
109110
* made focusable so that screen readers can reach and properly announce them to
110-
* users. Other interactions such as clicks remain disabled. This behavior is
111-
* currently experimental and can be enabled with the feature flag:
111+
* users, while still preventing clicks. This is currently available as an
112+
* experimental enhancement that can be enabled with the following feature flag:
112113
*
113114
* ```
114115
* // Set before any menu bar is attached to the DOM.
115-
* window.Vaadin.featureFlags.focusableDisabledComponents = true
116+
* window.Vaadin.featureFlags.accessibleDisabledButtons = true;
116117
* ```
117118
*/
118119
items: MenuBarItem[];

packages/menu-bar/src/vaadin-menu-bar-mixin.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,17 @@ export const MenuBarMixin = (superClass) =>
8181
* #### Disabled items
8282
*
8383
* When an item is disabled, it prevents any user interaction with it, such as
84-
* focusing, clicking, or opening a sub-menu.
84+
* focusing, clicking, opening a sub-menu, etc. The item is also removed from the
85+
* tab order, which may negatively impact accessibility.
8586
*
8687
* To improve accessibility, disabled root-level items (menu bar buttons) can be
8788
* made focusable so that screen readers can reach and properly announce them to
88-
* users. Other interactions such as clicks remain disabled. This behavior is
89-
* currently experimental and can be enabled with the feature flag:
89+
* users, while still preventing clicks. This is currently available as an
90+
* experimental enhancement that can be enabled with the following feature flag:
9091
*
9192
* ```
9293
* // Set before any menu bar is attached to the DOM.
93-
* window.Vaadin.featureFlags.focusableDisabledComponents = true
94+
* window.Vaadin.featureFlags.accessibleDisabledButtons = true;
9495
* ```
9596
*
9697
* @type {!Array<!MenuBarItem>}

packages/menu-bar/test/focusable-disabled-buttons.common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ describe('focusable disabled buttons', () => {
77

88
before(() => {
99
window.Vaadin.featureFlags ??= {};
10-
window.Vaadin.featureFlags.focusableDisabledComponents = true;
10+
window.Vaadin.featureFlags.accessibleDisabledButtons = true;
1111
});
1212

1313
after(() => {
14-
window.Vaadin.featureFlags.focusableDisabledComponents = false;
14+
window.Vaadin.featureFlags.accessibleDisabledButtons = false;
1515
});
1616

1717
beforeEach(async () => {

test/integration/menu-bar-tooltip.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ describe('menu-bar with tooltip', () => {
355355
describe('focusable disabled button', () => {
356356
before(() => {
357357
window.Vaadin.featureFlags ??= {};
358-
window.Vaadin.featureFlags.focusableDisabledComponents = true;
358+
window.Vaadin.featureFlags.accessibleDisabledButtons = true;
359359
});
360360

361361
after(() => {
362-
window.Vaadin.featureFlags.focusableDisabledComponents = false;
362+
window.Vaadin.featureFlags.accessibleDisabledButtons = false;
363363
});
364364

365365
beforeEach(async () => {

0 commit comments

Comments
 (0)