Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make disabled buttons focusable with feature flag #8513

Merged
merged 22 commits into from
Jan 21, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
polish JSDoc
vursen committed Jan 17, 2025
commit 16107663d15c104e0c0507dec35d501aa315d86f
11 changes: 5 additions & 6 deletions packages/button/src/vaadin-button.d.ts
Original file line number Diff line number Diff line change
@@ -38,13 +38,12 @@ import { ButtonMixin } from './vaadin-button-mixin.js';
*/
declare class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) {
/**
* When true, disables all user interactions with the button such as
* clicking, focusing, etc.
* When set to true, prevents any user interaction with the button
* such as clicking, focusing, etc.
*
* However, for better accessibility, it's strongly recommended to keep
* disabled buttons focusable so that screen readers can reach and properly
* announce them to users. This behavior is currently available behind the
* feature flag:
* To improve accessibility, disabled buttons can be made focusable
* so that screen readers can reach and properly announce them to
* users. This behavior can be enabled with the feature flag:
*
* ```
* // Enable before any button is attached to the DOM.
11 changes: 5 additions & 6 deletions packages/button/src/vaadin-button.js
Original file line number Diff line number Diff line change
@@ -53,13 +53,12 @@ class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(Poly
static get properties() {
return {
/**
* When true, disables all user interactions with the button such as
* clicking, focusing, etc.
* When set to true, prevents any user interaction with the button
* such as clicking, focusing, etc.
*
* However, for better accessibility, it's strongly recommended to keep
* disabled buttons focusable so that screen readers can reach and properly
* announce them to users. This behavior is currently available behind the
* feature flag:
* To improve accessibility, disabled buttons can be made focusable
* so that screen readers can reach and properly announce them to
* users. This behavior can be enabled with the feature flag:
*
* ```
* // Enable before any button is attached to the DOM.