Skip to content

Commit d9dac99

Browse files
committed
refactor useRowDisableSelection
1 parent dccf3a4 commit d9dac99

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

packages/main/src/components/AnalyticalTable/pluginHooks/useRowDisableSelection.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const headerProps = (
1515
props,
1616
{
1717
instance: {
18-
webComponentsReactProperties: { selectionMode },
18+
webComponentsReactProperties: { selectionMode, translatableTexts },
1919
},
2020
}: { instance: TableInstance },
2121
) => {
@@ -24,7 +24,18 @@ const headerProps = (
2424
selectionMode === AnalyticalTableSelectionMode.Multiple
2525
) {
2626
const style = { ...props.style, cursor: 'auto' };
27-
return [props, { onClick: undefined, onKeyDown: undefined, title: undefined, style }];
27+
const ariaLabel = props['aria-label']?.replace(translatableTexts.selectAllA11yText, '');
28+
return [
29+
props,
30+
{
31+
onClick: undefined,
32+
onKeyDown: undefined,
33+
onKeyUp: undefined,
34+
title: undefined,
35+
['aria-label']: ariaLabel,
36+
style,
37+
},
38+
];
2839
}
2940
return props;
3041
};

0 commit comments

Comments
 (0)