Skip to content

Commit 86c16fd

Browse files
authored
refactor(misc): Remove aria-hidden from icons (#11339)
* refactor(misc): Remove aria-hidden from icons * update snap for failing test
1 parent 0511acb commit 86c16fd

File tree

105 files changed

+235
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+235
-298
lines changed

packages/react-core/src/components/Alert/AlertToggleExpandButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const AlertToggleExpandButton: React.FunctionComponent<AlertToggleExpandB
3333
{...props}
3434
icon={
3535
<span className={css(styles.alertToggleIcon)}>
36-
<AngleRightIcon aria-hidden="true" />
36+
<AngleRightIcon />
3737
</span>
3838
}
3939
/>

packages/react-core/src/components/BackToTop/BackToTop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const BackToTopBase: React.FunctionComponent<BackToTopProps> = ({
8484
onClick={handleClick}
8585
{...props}
8686
>
87-
<Button variant="primary" icon={<AngleUpIcon aria-hidden="true" />} iconPosition="end">
87+
<Button variant="primary" icon={<AngleUpIcon />} iconPosition="end">
8888
{title}
8989
</Button>
9090
</div>

packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export const CalendarMonth = ({
292292
variant="plain"
293293
aria-label={prevMonthAriaLabel}
294294
onClick={(ev: React.MouseEvent) => onMonthClick(ev, prevMonth)}
295-
icon={<AngleLeftIcon aria-hidden={true} />}
295+
icon={<AngleLeftIcon />}
296296
/>
297297
</div>
298298
<InputGroup>
@@ -355,7 +355,7 @@ export const CalendarMonth = ({
355355
variant="plain"
356356
aria-label={nextMonthAriaLabel}
357357
onClick={(ev: React.MouseEvent) => onMonthClick(ev, nextMonth)}
358-
icon={<AngleRightIcon aria-hidden={true} />}
358+
icon={<AngleRightIcon />}
359359
/>
360360
</div>
361361
</div>

packages/react-core/src/components/Card/CardHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const CardHeader: React.FunctionComponent<CardHeaderProps> = ({
104104
{...toggleButtonProps}
105105
icon={
106106
<span className={css(styles.cardHeaderToggleIcon)}>
107-
<AngleRightIcon aria-hidden="true" />
107+
<AngleRightIcon />
108108
</span>
109109
}
110110
/>

packages/react-core/src/components/Card/examples/CardExpandable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const CardExpandable: React.FunctionComponent = () => {
7171
onClick={() => setIsOpen(!isOpen)}
7272
variant="plain"
7373
aria-label="Card expandable example kebab toggle"
74-
icon={<EllipsisVIcon aria-hidden="true" />}
74+
icon={<EllipsisVIcon />}
7575
/>
7676
)}
7777
isOpen={isOpen}

packages/react-core/src/components/Card/examples/CardExpandableWithIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const CardExpandableWithIcon: React.FunctionComponent = () => {
6767
onClick={() => setIsOpen(!isOpen)}
6868
variant="plain"
6969
aria-label="Card expandable with icon example kebab toggle"
70-
icon={<EllipsisVIcon aria-hidden="true" />}
70+
icon={<EllipsisVIcon />}
7171
/>
7272
)}
7373
isOpen={isOpen}

packages/react-core/src/components/Card/examples/CardHeaderInCardHead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const CardTitleInHeader: React.FunctionComponent = () => {
5858
onClick={() => setIsOpen(!isOpen)}
5959
variant="plain"
6060
aria-label="Card title inline with images and actions example kebab toggle"
61-
icon={<EllipsisVIcon aria-hidden="true" />}
61+
icon={<EllipsisVIcon />}
6262
/>
6363
)}
6464
isOpen={isOpen}

packages/react-core/src/components/Card/examples/CardOnlyActionsInCardHead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const CardOnlyActionsInCardHead: React.FunctionComponent = () => {
5656
onClick={() => setIsOpen(!isOpen)}
5757
variant="plain"
5858
aria-label="Card header without title example kebab toggle"
59-
icon={<EllipsisVIcon aria-hidden="true" />}
59+
icon={<EllipsisVIcon />}
6060
/>
6161
)}
6262
isOpen={isOpen}

packages/react-core/src/components/Card/examples/CardWithImageAndActions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const CardWithImageAndActions: React.FunctionComponent = () => {
6464
onClick={() => setIsOpen(!isOpen)}
6565
variant="plain"
6666
aria-label="Card header images and actions example kebab toggle"
67-
icon={<EllipsisVIcon aria-hidden="true" />}
67+
icon={<EllipsisVIcon />}
6868
/>
6969
)}
7070
isOpen={isOpen}

packages/react-core/src/components/ClipboardCopy/ClipboardCopyToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const ClipboardCopyToggle: React.FunctionComponent<ClipboardCopyTogglePro
3333
{...props}
3434
icon={
3535
<div className={css(styles.clipboardCopyToggleIcon)}>
36-
<AngleRightIcon aria-hidden="true" />
36+
<AngleRightIcon />
3737
</div>
3838
}
3939
/>

0 commit comments

Comments
 (0)