diff --git a/packages/react-core/src/components/Alert/AlertActionLink.tsx b/packages/react-core/src/components/Alert/AlertActionLink.tsx
index f4a54d124f0..b881e861fd9 100644
--- a/packages/react-core/src/components/Alert/AlertActionLink.tsx
+++ b/packages/react-core/src/components/Alert/AlertActionLink.tsx
@@ -6,8 +6,8 @@ import { Button, ButtonVariant, ButtonProps } from '../Button';
*/
export interface AlertActionLinkProps extends ButtonProps {
- /** Content rendered inside the alert action link. */
- children?: string;
+ /** Content rendered inside the alert action link. Interactive content such as anchor elements should not be passed in. */
+ children?: React.ReactNode;
/** Additional classes added to the alert action link. */
className?: string;
}
diff --git a/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx b/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx
index 49f06bd1cce..3e22ee03c5e 100644
--- a/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx
+++ b/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx
@@ -20,6 +20,18 @@ test('Renders children', () => {
expect(screen.getByRole('button')).toBeVisible();
});
+test('Renders ReactNode as children', () => {
+ render(
+
+
+ Learn More
+
+
+ );
+
+ expect(screen.getByText('Learn More')).toBeVisible();
+});
+
test('Renders with custom class names provided via prop', () => {
render(Test);