Skip to content

Commit

Permalink
Fix #7166 - Datatable : fix ColumnFilter aria-controls (#7167)
Browse files Browse the repository at this point in the history
Set 'aria-controls' for ColumnFilter only when the menu filter is visible.

fix #7166
  • Loading branch information
kyybo authored Sep 12, 2024
1 parent 14e9180 commit 2648933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/datatable/ColumnFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ export const ColumnFilter = React.memo((props) => {
'aria-haspopup': true,
'aria-expanded': overlayVisibleState,
'aria-label': label,
'aria-controls': overlayId.current,
'aria-controls': overlayVisibleState ? overlayId.current : undefined,
onClick: (e) => toggleMenu(e),
onKeyDown: (e) => onToggleButtonKeyDown(e)
},
Expand Down

0 comments on commit 2648933

Please sign in to comment.