diff --git a/vaadin-button-flow-parent/vaadin-button-flow/src/main/java/com/vaadin/flow/component/button/Button.java b/vaadin-button-flow-parent/vaadin-button-flow/src/main/java/com/vaadin/flow/component/button/Button.java index 4cf70234056..ee9c26f9375 100644 --- a/vaadin-button-flow-parent/vaadin-button-flow/src/main/java/com/vaadin/flow/component/button/Button.java +++ b/vaadin-button-flow-parent/vaadin-button-flow/src/main/java/com/vaadin/flow/component/button/Button.java @@ -15,8 +15,6 @@ */ package com.vaadin.flow.component.button; -import com.vaadin.experimental.Feature; -import com.vaadin.experimental.FeatureFlags; import com.vaadin.flow.component.ClickEvent; import com.vaadin.flow.component.ClickNotifier; import com.vaadin.flow.component.Component; @@ -33,7 +31,6 @@ import com.vaadin.flow.component.SignalPropertySupport; import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.Text; -import com.vaadin.flow.component.UI; import com.vaadin.flow.component.dependency.JsModule; import com.vaadin.flow.component.dependency.NpmPackage; import com.vaadin.flow.component.html.Image; @@ -452,24 +449,11 @@ public boolean isDisableOnClick() { /** * Sets the button explicitly disabled or enabled. When disabled, the button - * is rendered as "dimmed". - *
- * By default, disabled buttons are not focusable and don't react to hover. - * As a result, they are hidden from assistive technologies, and it's not - * possible to show a tooltip to explain why they are disabled. This can be - * addressed by enabling the feature flag {@code accessibleDisabledButtons}, - * which makes disabled buttons focusable and hoverable, while still - * preventing them from being activated. To enable this feature flag, add - * the following line to - * {@code src/main/resources/vaadin-featureflags.properties}: - * - *
- * com.vaadin.experimental.accessibleDisabledButtons = true - *+ * is rendered as "dimmed" and prevented from being activated. Disabled + * buttons remain focusable and hoverable, so they stay visible to assistive + * technologies and can show a tooltip to explain why they are disabled. + * Focus events and focus shortcuts also remain active for disabled buttons. * - * This feature flag will also enable focus events and focus shortcuts for - * disabled buttons. - * * @since 24.3.8 */ @Override @@ -506,17 +490,8 @@ public SignalBinding
- * By default, focus shortcuts are only active when the button is enabled. - * To make disabled buttons also focusable, enable the following feature - * flag in {@code src/main/resources/vaadin-featureflags.properties}: - * - *
- * com.vaadin.experimental.accessibleDisabledButtons = true - *+ * Focus shortcuts are also active when the button is disabled. * - * This feature flag will enable focus events and focus shortcuts for - * disabled buttons. - * * @since 24.7 */ @Override @@ -524,26 +499,15 @@ public ShortcutRegistration addFocusShortcut(Key key, KeyModifier... keyModifiers) { ShortcutRegistration registration = Focusable.super.addFocusShortcut( key, keyModifiers); - if (isFeatureFlagEnabled(FeatureFlags.ACCESSIBLE_DISABLED_BUTTONS)) { - registration.setDisabledUpdateMode(DisabledUpdateMode.ALWAYS); - } + registration.setDisabledUpdateMode(DisabledUpdateMode.ALWAYS); return registration; } /** * {@inheritDoc} *
- * By default, buttons are only focusable in the enabled state. To make - * disabled buttons also focusable, enable the following feature flag in - * {@code src/main/resources/vaadin-featureflags.properties}: + * Focus events are also fired when the button is disabled. * - *
- * com.vaadin.experimental.accessibleDisabledButtons = true - *- * - * This feature flag will enable focus events and focus shortcuts for - * disabled buttons. - * * @since 24.7 */ @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -551,26 +515,15 @@ public ShortcutRegistration addFocusShortcut(Key key, public Registration addFocusListener( ComponentEventListener
- * By default, buttons are only focusable in the enabled state. To make - * disabled buttons also focusable, enable the following feature flag in - * {@code src/main/resources/vaadin-featureflags.properties}: + * Blur events are also fired when the button is disabled. * - *
- * com.vaadin.experimental.accessibleDisabledButtons = true - *- * * @since 24.7 */ @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -578,13 +531,8 @@ public Registration addFocusListener( public Registration addBlurListener( ComponentEventListener
- * By default, disabled items are not focusable and don't react to hover. As - * a result, they are hidden from assistive technologies, and it's not - * possible to show a tooltip to explain why they are disabled. This can be - * addressed by enabling the feature flag - * {@code accessibleDisabledMenuItems}, which makes disabled items focusable - * and hoverable, while still preventing them from being activated. To - * enable this feature flag, add the following line to - * {@code src/main/resources/vaadin-featureflags.properties}: + * items are rendered as "dimmed" and prevented from being activated. + * Disabled items remain focusable and hoverable, so they stay visible to + * assistive technologies and can show a tooltip to explain why they are + * disabled. * - *
- * com.vaadin.experimental.accessibleDisabledMenuItems = true - *- * * @since 25.2 */ @Override diff --git a/vaadin-context-menu-flow-parent/vaadin-context-menu-flow/src/main/resources/META-INF/services/com.vaadin.experimental.FeatureFlagProvider b/vaadin-context-menu-flow-parent/vaadin-context-menu-flow/src/main/resources/META-INF/services/com.vaadin.experimental.FeatureFlagProvider deleted file mode 100644 index a56d2b1923e..00000000000 --- a/vaadin-context-menu-flow-parent/vaadin-context-menu-flow/src/main/resources/META-INF/services/com.vaadin.experimental.FeatureFlagProvider +++ /dev/null @@ -1 +0,0 @@ -com.vaadin.flow.component.contextmenu.AccessibleDisabledMenuItemsFeatureFlagProvider diff --git a/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/src/main/resources/vaadin-featureflags.properties b/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/src/main/resources/vaadin-featureflags.properties deleted file mode 100644 index 62d1eb1a38a..00000000000 --- a/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/src/main/resources/vaadin-featureflags.properties +++ /dev/null @@ -1,2 +0,0 @@ -com.vaadin.experimental.accessibleDisabledButtons=true -com.vaadin.experimental.accessibleDisabledMenuItems=true diff --git a/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow/src/main/java/com/vaadin/flow/component/menubar/MenuBarItem.java b/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow/src/main/java/com/vaadin/flow/component/menubar/MenuBarItem.java index 27966709277..d2d1cede73f 100644 --- a/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow/src/main/java/com/vaadin/flow/component/menubar/MenuBarItem.java +++ b/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow/src/main/java/com/vaadin/flow/component/menubar/MenuBarItem.java @@ -43,23 +43,10 @@ protected MenuBarSubMenu createSubMenu() { /** * Sets the menu item explicitly disabled or enabled. When disabled, menu - * bar items are rendered as "dimmed". - *
- * By default, disabled items are not focusable and don't react to hover. As - * a result, they are hidden from assistive technologies, and it's not - * possible to show a tooltip to explain why they are disabled. This can be - * addressed by enabling several feature flags, which make disabled items - * focusable and hoverable, while still preventing them from being - * activated. To enable the feature flags, add the following lines to - * {@code src/main/resources/vaadin-featureflags.properties}: - * - *
- * # Allow focus and hover interactions with disabled menu bar root items (buttons) - * com.vaadin.experimental.accessibleDisabledButtons = true - * - * # Allow focus and hover interactions with disabled menu bar sub-menu items - * com.vaadin.experimental.accessibleDisabledMenuItems = true - *+ * bar items are rendered as "dimmed" and prevented from being activated. + * Disabled items remain focusable and hoverable, so they stay visible to + * assistive technologies and can show a tooltip to explain why they are + * disabled. */ @Override public void setEnabled(boolean enabled) {