Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions articles/components/context-menu/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@

See the <<../tooltip#,Tooltips documentation page>> for details on tooltip configuration.

Tooltips are also useful on disabled menu items to explain why an action is unavailable, but they are not shown by default. See <<#disabled-menu-items,Disabled Menu Items>> for how to enable them.


== Custom Items

Expand Down Expand Up @@ -310,6 +312,25 @@
endif::[]
--

By default, disabled menu items aren't focusable or hoverable, which hides them from assistive technologies and prevents Tooltips on disabled items from showing. The [since:com.vaadin:vaadin@V25.2]#`accessibleDisabledMenuItems`# feature flag can be enabled to make them focusable and hoverable without allowing them to be triggered:

Check failure on line 315 in articles/components/context-menu/index.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'hoverable'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'hoverable'?", "location": {"path": "articles/components/context-menu/index.adoc", "range": {"start": {"line": 315, "column": 285}}}, "severity": "ERROR"}

Check failure on line 315 in articles/components/context-menu/index.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'hoverable'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'hoverable'?", "location": {"path": "articles/components/context-menu/index.adoc", "range": {"start": {"line": 315, "column": 53}}}, "severity": "ERROR"}

[.example]
--
.`Flow`
[source,properties]
----
# Add this line to src/main/resources/vaadin-featureflags.properties
com.vaadin.experimental.accessibleDisabledMenuItems=true
----

.`Lit & React`
[source,js]
----
// Set before any menu is added to the DOM
window.Vaadin.featureFlags.accessibleDisabledMenuItems = true;
----
--


=== Disable on Click (Flow)

Expand Down
23 changes: 22 additions & 1 deletion articles/components/menu-bar/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
endif::[]
--

By default, disabled buttons (i.e., root-level items) are not focusable and cannot react to hover events. This can cause accessibility issues by making them entirely invisible to assistive technologies, and prevents the use of Tooltips to explain why the action is not available. This can be addressed by enabling the feature flag `accessibleDisabledButtons`, which allows focusing and hovering on disabled buttons, while preventing them from being triggered:
By default, disabled buttons (i.e., root-level items) aren't focusable or hoverable, which hides them from assistive technologies and prevents Tooltips on disabled buttons from showing. The `accessibleDisabledButtons` feature flag can be enabled to make them focusable and hoverable without allowing them to be triggered:

Check failure on line 187 in articles/components/menu-bar/index.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'hoverable'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'hoverable'?", "location": {"path": "articles/components/menu-bar/index.adoc", "range": {"start": {"line": 187, "column": 274}}}, "severity": "ERROR"}

Check failure on line 187 in articles/components/menu-bar/index.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'hoverable'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'hoverable'?", "location": {"path": "articles/components/menu-bar/index.adoc", "range": {"start": {"line": 187, "column": 75}}}, "severity": "ERROR"}

[.example]
--
Expand All @@ -203,6 +203,25 @@
----
--

Similarly, the [since:com.vaadin:vaadin@V25.2]#`accessibleDisabledMenuItems`# feature flag can be enabled to make disabled sub-menu items focusable and hoverable without allowing them to be triggered:

Check failure on line 206 in articles/components/menu-bar/index.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'hoverable'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'hoverable'?", "location": {"path": "articles/components/menu-bar/index.adoc", "range": {"start": {"line": 206, "column": 153}}}, "severity": "ERROR"}

[.example]
--
.`Flow`
[source,properties]
----
# Add this line to src/main/resources/vaadin-featureflags.properties
com.vaadin.experimental.accessibleDisabledMenuItems=true
----

.`Lit & React`
[source,js]
----
// Set before any menu is added to the DOM
window.Vaadin.featureFlags.accessibleDisabledMenuItems = true;
----
--


=== Checkable Menu Items

Expand Down Expand Up @@ -343,6 +362,8 @@

See the <<../tooltip#,Tooltips documentation page>> for details on tooltip configuration.

Tooltips are also useful on disabled menu items to explain why an action is unavailable, but they are not shown by default. See <<#disabled-items,Disabled Items>> for how to enable them.


== Keyboard Usage

Expand Down
Loading