Skip to content

Commit 67fa302

Browse files
committed
improved the usage of aria tags
1 parent 8d8bc59 commit 67fa302

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => {
544544
</p>
545545
</Content>
546546
</PageSection>
547-
<PageSection aria-label="Panel section content">Panel section content</PageSection>
547+
<PageSection aria-label="Panel section">Panel section content</PageSection>
548548
</Page>
549549
</Fragment>
550550
);

packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => {
779779
</p>
780780
</Content>
781781
</PageSection>
782-
<PageSection aria-label="Panel section content">Panel section content</PageSection>
782+
<PageSection aria-label="Panel section">Panel section content</PageSection>
783783
</Page>
784784
</Fragment>
785785
);

packages/react-core/src/demos/examples/Page/PageContextSelector.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,11 @@ export const PageStickySectionBreadcrumb: React.FunctionComponent = () => {
325325
mainContainerId={mainContainerId}
326326
isBreadcrumbWidthLimited
327327
>
328-
<PageSection isWidthLimited aria-label="Main title">
328+
<PageSection isWidthLimited aria-labelledby="main-title">
329329
<Content>
330-
<Content component="h1">Main title</Content>
330+
<Content component="h1" id="main-title">
331+
Main title
332+
</Content>
331333
<Content component="p">This is a full page demo.</Content>
332334
</Content>
333335
</PageSection>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ export const PrimaryDetailCardView: React.FunctionComponent = () => {
612612

613613
return (
614614
<DashboardWrapper mainContainerId="main-content-card-view-default-nav" breadcrumb={null}>
615-
<PageSection aria-labelledby="projects-heading">
615+
<PageSection aria-labelledby="projects">
616616
<Content>
617-
<h1 id="projects-heading">Projects</h1>
617+
<h1 id="projects">Projects</h1>
618618
<p>This is a demo that showcases Patternfly cards.</p>
619619
</Content>
620620
</PageSection>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ export const SkeletonCard: React.FunctionComponent = () => {
2727
);
2828
return (
2929
<DashboardWrapper isBreadcrumbWidthLimited>
30-
<PageSection isWidthLimited aria-label="Main title">
31-
<Content component="h1">Main title</Content>
30+
<PageSection isWidthLimited aria-label="main-title">
31+
<Content component="h1" id="main-title">
32+
Main title
33+
</Content>
3234
<Content component="p">This is a full page demo.</Content>
3335
</PageSection>
3436
<PageSection aria-label="Card gallery">

packages/react-core/src/demos/examples/Wizard/InModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard
1515
export const WizardInModalDemo: React.FunctionComponent = () => (
1616
<>
1717
<DashboardWrapper hasPageTemplateTitle>
18-
<PageSection isWidthLimited aria-label="Card gallery section">
18+
<PageSection isWidthLimited aria-label="Card gallery">
1919
<Gallery hasGutter>
2020
{Array.from({ length: 10 }).map((_value, index) => (
2121
<GalleryItem key={index}>

0 commit comments

Comments
 (0)