Skip to content

Commit

Permalink
Data views: Use aria-disabled on disabled checkboxes (#59364)
Browse files Browse the repository at this point in the history
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: andrewhayward <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: alexstine <[email protected]>
Co-authored-by: scruffian <[email protected]>
  • Loading branch information
9 people authored Mar 4, 2024
1 parent 7df076f commit 83952bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/dataviews/src/single-selection-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ export default function SingleSelectionCheckbox( {
<CheckboxControl
className="dataviews-view-table-selection-checkbox"
__nextHasNoMarginBottom
checked={ isSelected }
label={ selectionLabel }
disabled={ disabled }
aria-disabled={ disabled }
checked={ isSelected }
onChange={ () => {
if ( disabled ) {
return;
}

if ( ! isSelected ) {
onSelectionChange(
data.filter( ( _item ) => {
Expand Down

0 comments on commit 83952bb

Please sign in to comment.