Skip to content

Commit e351dad

Browse files
committed
added a11y labels to examples
1 parent bfa54e7 commit e351dad

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,17 @@ export const PrimaryDetailDataListInCard: React.FunctionComponent = () => {
181181

182182
return (
183183
<DashboardWrapper>
184-
<PageSection>
184+
<PageSection aria-labelledby="main-title">
185185
<Content>
186-
<h1>Main title</h1>
186+
<h1 id="main-title">Main title</h1>
187187
<p>
188188
Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
189189
of it’s relative line height of 1.5.
190190
</p>
191191
</Content>
192192
</PageSection>
193193
<Divider component="div" />
194-
<PageSection>
194+
<PageSection aria-label="Card with drawer content">
195195
<Card>
196196
<Drawer isStatic isExpanded={isExpanded}>
197197
<DrawerContent panelContent={panelContent}>

packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,17 @@ export const PrimaryDetailFullPage: React.FunctionComponent = () => {
417417

418418
return (
419419
<DashboardWrapper mainContainerId="main-content-page-layout-default-nav">
420-
<PageSection>
420+
<PageSection aria-labelledby="main-title">
421421
<Content>
422-
<h1>Main title</h1>
422+
<h1 id="main-title">Main title</h1>
423423
<p>
424424
Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
425425
of it's relative line height of 1.5.
426426
</p>
427427
</Content>
428428
</PageSection>
429429
<Divider component="div" />
430-
<PageSection padding={{ default: 'noPadding' }}>
430+
<PageSection padding={{ default: 'noPadding' }} aria-label="Card with drawer content">
431431
<Drawer isExpanded={isDrawerExpanded}>
432432
<DrawerContent panelContent={panelContent}>
433433
<DrawerContentBody>{drawerContent}</DrawerContentBody>

packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,17 @@ export const PrimaryDetailInlineModifier: React.FunctionComponent = () => {
417417

418418
return (
419419
<DashboardWrapper>
420-
<PageSection>
420+
<PageSection aria-labelledby="main-title">
421421
<Content>
422-
<h1>Main title</h1>
422+
<h1 id="main-title">Main title</h1>
423423
<p>
424424
Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
425425
of it's relative line height of 1.5.
426426
</p>
427427
</Content>
428428
</PageSection>
429429
<Divider component="div" />
430-
<PageSection padding={{ default: 'noPadding' }}>
430+
<PageSection padding={{ default: 'noPadding' }} aria-label="Card with drawer content">
431431
<Drawer isExpanded={isDrawerExpanded} isInline>
432432
<DrawerContent panelContent={panelContent}>
433433
<DrawerContentBody>{drawerContent}</DrawerContentBody>

packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ export const PrimaryDetailSimpleListInCard: React.FunctionComponent = () => {
9090

9191
return (
9292
<DashboardWrapper>
93-
<PageSection>
93+
<PageSection aria-labelledby="main-title">
9494
<Content>
95-
<h1>Main title</h1>
95+
<h1 id="main-title">Main title</h1>
9696
<p>
9797
Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
9898
of it’s relative line height of 1.5.
9999
</p>
100100
</Content>
101101
</PageSection>
102102
<Divider component="div" />
103-
<PageSection>
103+
<PageSection aria-label="Card with drawer content">
104104
<Card>
105105
<Drawer isStatic isExpanded={isExpanded}>
106106
<DrawerContent panelContent={panelContent}>

packages/react-core/src/demos/examples/Skeleton/SkeletonCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ export const SkeletonCard: React.FunctionComponent = () => {
2727
);
2828
return (
2929
<DashboardWrapper isBreadcrumbWidthLimited>
30-
<PageSection isWidthLimited>
30+
<PageSection isWidthLimited aria-label="Main title">
3131
<Content component="h1">Main title</Content>
3232
<Content component="p">This is a full page demo.</Content>
3333
</PageSection>
34-
<PageSection>
34+
<PageSection aria-label="Card gallery">
3535
<Gallery hasGutter>{Array.from({ length: 7 }).map((_value, index) => card(index))}</Gallery>
3636
</PageSection>
3737
</DashboardWrapper>

packages/react-core/src/demos/examples/Toolbar/ConsoleLogViewerToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export const ConsoleLogViewerToolbar: React.FC = () => {
486486

487487
return (
488488
<DashboardWrapper sidebarNavOpen={!mobileView} onPageResize={onPageResize}>
489-
<PageSection>
489+
<PageSection aria-label="Log viewer controls">
490490
<Toolbar id="log-viewer-toolbar" inset={{ default: 'insetNone' }}>
491491
<ToolbarContent>{items}</ToolbarContent>
492492
</Toolbar>

0 commit comments

Comments
 (0)