Skip to content

Commit

Permalink
Use disabled and __experimentalIsFocusable instead of aria-disabled i…
Browse files Browse the repository at this point in the history
…n buttons
  • Loading branch information
oandregal committed Nov 15, 2023
1 parent 0a655be commit c10be61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/edit-site/src/components/dataviews/add-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export default function AddFilter( { fields, view, onChangeView } ) {
label={ __( 'Add filter' ) }
trigger={
<Button
aria-disabled={ filters.length === view.filters?.length }
disabled={ filters.length === view.filters?.length }
__experimentalIsFocusable={ true }
__next40pxDefaultSize={ true }
icon={ plus }
variant="tertiary"
Expand Down
3 changes: 2 additions & 1 deletion packages/edit-site/src/components/dataviews/reset-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { __ } from '@wordpress/i18n';
export default ( { view, onChangeView } ) => {
return (
<Button
aria-disabled={ view.search === '' && view.filters?.length === 0 }
disabled={ view.search === '' && view.filters?.length === 0 }
__experimentalIsFocusable={ true }
__next40pxDefaultSize={ true }
variant="tertiary"
onClick={ () => {
Expand Down

0 comments on commit c10be61

Please sign in to comment.