Skip to content

Commit 5bc23a2

Browse files
author
Kubit
committed
Include aria-hidden prop to Illustration component
1 parent acc38d1 commit 5bc23a2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/illustration/illustrationStandAlone.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ const IllustrationStandAloneComponent = (
1414
rotate = '0deg',
1515
transitionDuration = '0.2s',
1616
dataTestId,
17+
'aria-hidden': ariaHidden,
1718
}: IIllustrationStandAlone,
1819
ref: React.ForwardedRef<HTMLImageElement> | undefined | null
1920
): JSX.Element => {
20-
const isEmptyAltText = !altText;
21+
const isEmptyAltText = ariaHidden || !altText;
2122

2223
return (
2324
<IllustrationStyled

src/components/illustration/types/illustration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IllustrationTypes } from '@/types';
22

33
type IllustrationAriaAttributes = Pick<
44
React.AriaAttributes,
5-
'aria-label' | 'aria-controls' | 'aria-checked'
5+
'aria-label' | 'aria-controls' | 'aria-checked' | 'aria-hidden'
66
>;
77

88
export interface IIllustrationStandAlone extends IllustrationAriaAttributes {

0 commit comments

Comments
 (0)