-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: Fix inaccessible disabled Button
s
#62306
Changes from 5 commits
629a35c
01d28f2
2cea1eb
ed03d97
f95b0b2
747eb2b
d80ba0e
74c34ef
5f92fdc
4291708
8c1dce3
f0b3b63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,6 +199,7 @@ function UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) { | |
? control.role | ||
: 'menuitem' | ||
} | ||
__experimentalIsFocusable | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabled items in a dropdown menu should be perceivable. |
||
disabled={ control.isDisabled } | ||
> | ||
{ control.title } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -326,6 +326,8 @@ function UnforwardedRangeControl( | |
<ActionRightWrapper> | ||
<Button | ||
className="components-range-control__reset" | ||
// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence. | ||
__experimentalIsFocusable={ ! disabled } | ||
disabled={ disabled || value === undefined } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a bug in the |
||
variant="secondary" | ||
size="small" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabled toolbar buttons should always be perceivable. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ function UnforwardedToolbarButton( | |
className | ||
) } | ||
isPressed={ isActive } | ||
__experimentalIsFocusable | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabled toolbar buttons should always be perceivable. |
||
disabled={ isDisabled } | ||
data-toolbar-item | ||
{ ...extraProps } | ||
|
@@ -85,6 +86,7 @@ function UnforwardedToolbarButton( | |
<Button | ||
label={ title } | ||
isPressed={ isActive } | ||
__experimentalIsFocusable | ||
disabled={ isDisabled } | ||
{ ...toolbarItemProps } | ||
> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled items in a popover menu should be perceivable.