Skip to content

Commit

Permalink
rename feature flag, update JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Jan 17, 2025
1 parent a0fe14e commit 93efcd6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions packages/menu-bar/src/vaadin-menu-bar-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,17 @@ export declare class MenuBarMixinClass {
* #### Disabled items
*
* When an item is disabled, it prevents any user interaction with it, such as
* focusing, clicking, or opening a sub-menu.
* focusing, clicking, opening a sub-menu, etc. The item is also removed from the
* tab order, which may negatively impact accessibility.
*
* To improve accessibility, disabled root-level items (menu bar buttons) can be
* made focusable so that screen readers can reach and properly announce them to
* users. Other interactions such as clicks remain disabled. This behavior is
* currently experimental and can be enabled with the feature flag:
* users, while still preventing clicks. This is currently available as an
* experimental enhancement that can be enabled with the following feature flag:
*
* ```
* // Set before any menu bar is attached to the DOM.
* window.Vaadin.featureFlags.focusableDisabledComponents = true
* window.Vaadin.featureFlags.accessibleDisabledButtons = true;
* ```
*/
items: MenuBarItem[];
Expand Down
9 changes: 5 additions & 4 deletions packages/menu-bar/src/vaadin-menu-bar-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,17 @@ export const MenuBarMixin = (superClass) =>
* #### Disabled items
*
* When an item is disabled, it prevents any user interaction with it, such as
* focusing, clicking, or opening a sub-menu.
* focusing, clicking, opening a sub-menu, etc. The item is also removed from the
* tab order, which may negatively impact accessibility.
*
* To improve accessibility, disabled root-level items (menu bar buttons) can be
* made focusable so that screen readers can reach and properly announce them to
* users. Other interactions such as clicks remain disabled. This behavior is
* currently experimental and can be enabled with the feature flag:
* users, while still preventing clicks. This is currently available as an
* experimental enhancement that can be enabled with the following feature flag:
*
* ```
* // Set before any menu bar is attached to the DOM.
* window.Vaadin.featureFlags.focusableDisabledComponents = true
* window.Vaadin.featureFlags.accessibleDisabledButtons = true;
* ```
*
* @type {!Array<!MenuBarItem>}
Expand Down

0 comments on commit 93efcd6

Please sign in to comment.