Skip to content

Commit 9bdb4aa

Browse files
committed
fix: attempt accessibility fix
1 parent 86b71fd commit 9bdb4aa

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

packages/module/patternfly-docs/content/extensions/component-groups/examples/CullingInfo/CullingInfoCustomExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Stack, StackItem } from '@patternfly/react-core';
55

66
export const CustomizedRenderExample: React.FunctionComponent = () => {
77
const staleDate = new Date('Sun Jan 26 2020');
8-
const warningDate = new Date('Mon Feb 03 2025');
9-
const cullingDate = new Date('Fri Feb 07 2025');
8+
const warningDate = new Date('Mon Feb 15 2025');
9+
const cullingDate = new Date('Fri Feb 20 2025');
1010
return <>
1111
<Stack>
1212
<StackItem>

packages/module/patternfly-docs/content/extensions/component-groups/examples/CullingInfo/CullingInfoExample.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Stack, StackItem } from '@patternfly/react-core';
44

55
export const BasicExample: React.FunctionComponent = () => {
66
const staleDate = new Date('Sun Jan 26 2020');
7-
const warningDate = new Date('Mon Feb 03 2025');
8-
const cullingDate = new Date('Fri Feb 07 2025');
7+
const warningDate = new Date('Mon Feb 15 2025');
8+
const cullingDate = new Date('Fri Feb 20 2025');
99
return <>
1010
<Stack>
1111
<StackItem>
@@ -21,8 +21,8 @@ export const BasicExample: React.FunctionComponent = () => {
2121
<CullingInformation
2222
stale={staleDate}
2323
currDate={new Date()}
24-
culled={new Date('Fri Feb 07 2024')}
25-
staleWarning={new Date('Mon Feb 03 2024')}
24+
culled={new Date('Fri Feb 17 2024')}
25+
staleWarning={new Date('Mon Feb 5 2024')}
2626
>
2727
</CullingInformation>
2828
</StackItem>

packages/module/src/CullingInfo/CullingInfo.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,13 @@ const CullingInformation: React.FunctionComponent<CullingInformation> = ({
116116
}
117117

118118
return (
119-
<React.Fragment>
120-
<Tooltip {...props} content={msg} position="bottom">
121-
<span
122-
className={clsx(className)}
123-
>
124-
{isError && <Button variant="plain" aria-label="Action" role="tooltip" icon={<ExclamationTriangleIcon className={clsx( classes.inventoryCullingWarning )}/>} />}
125-
{isWarn && <Button variant="plain" aria-label="Action" role="tooltip" icon={<ExclamationCircleIcon className={clsx( classes.inventoryCullingDanger )}/>} />}
126-
{children}
127-
</span>
128-
</Tooltip>
129-
</React.Fragment>
119+
<Tooltip {...props} content={<div>{msg}</div>} aria="none">
120+
<span role='tooltip'>
121+
{isError && <Button variant="plain" role="tooltip" icon={<ExclamationTriangleIcon className={clsx( classes.inventoryCullingWarning )}/>} alt="warning icon" />}
122+
{isWarn && <Button variant="plain" role="tooltip" icon={<ExclamationCircleIcon className={clsx( classes.inventoryCullingDanger )}/>} alt="danger icon" />}
123+
{children}
124+
</span>
125+
</Tooltip>
130126
);
131127
};
132128

0 commit comments

Comments
 (0)