Skip to content

Commit 2aac662

Browse files
committed
revert action change
1 parent b70387f commit 2aac662

File tree

4 files changed

+3
-31
lines changed

4 files changed

+3
-31
lines changed

packages/react-core/src/components/DataList/DataListAction.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,15 @@ export const DataListAction: React.FunctionComponent<DataListActionProps> = ({
3131
children,
3232
className,
3333
visibility,
34+
/* eslint-disable @typescript-eslint/no-unused-vars */
3435
id,
3536
'aria-label': ariaLabel,
3637
'aria-labelledby': ariaLabelledBy,
38+
/* eslint-disable @typescript-eslint/no-unused-vars */
3739
isPlainButtonAction,
3840
...props
3941
}: DataListActionProps) => (
40-
<div
41-
className={css(styles.dataListItemAction, formatBreakpointMods(visibility, styles), className)}
42-
id={id}
43-
aria-label={ariaLabel}
44-
aria-labelledby={ariaLabelledBy}
45-
{...props}
46-
>
42+
<div className={css(styles.dataListItemAction, formatBreakpointMods(visibility, styles), className)} {...props}>
4743
{isPlainButtonAction ? <div className={css(styles.dataListAction)}>{children}</div> : children}
4844
</div>
4945
);

packages/react-core/src/components/DataList/__tests__/DataListAction.test.tsx

-18
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,3 @@ test(`Renders with class ${styles.dataListAction} when isPlainButtonAction = tru
7373
expect(screen.getByText('test')).toHaveClass(styles.modifiers[`${visMod}On_2xl`]);
7474
});
7575
});
76-
77-
test(`Renders with aria-label when aria-label is passed`, () => {
78-
render(
79-
<DataListAction aria-label="Actions" aria-labelledby="ex-action" id="ex-action">
80-
test
81-
</DataListAction>
82-
);
83-
expect(screen.getByText('test')).toHaveAccessibleName('Actions');
84-
});
85-
86-
test(`Renders with aria-labelledby when aria-label is passed`, () => {
87-
render(
88-
<DataListAction aria-label="Actions" aria-labelledby="ex-action" id="ex-action">
89-
test
90-
</DataListAction>
91-
);
92-
expect(screen.getByText('test')).toHaveAttribute('aria-labelledby', 'ex-action');
93-
});

packages/react-core/src/components/DataList/__tests__/Generated/__snapshots__/DataListAction.test.tsx.snap

-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
exports[`DataListAction should match snapshot (auto-generated) 1`] = `
44
<DocumentFragment>
55
<div
6-
aria-label="string"
7-
aria-labelledby="string"
86
class="pf-v5-c-data-list__item-action ''"
9-
id="string"
107
>
118
<div>
129
ReactNode

packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListAction.test.tsx.snap

-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
exports[`Renders to match snapshot 1`] = `
44
<DocumentFragment>
55
<div
6-
aria-label="Actions"
7-
aria-labelledby="ex-action"
86
class="pf-v5-c-data-list__item-action"
9-
id="ex-action"
107
>
118
test
129
</div>

0 commit comments

Comments
 (0)