Skip to content

Commit a28eae6

Browse files
committed
update basic example and aria
1 parent f9f220f commit a28eae6

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

packages/react-core/src/components/Compass/examples/CompassBasic.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import {
88
} from '@patternfly/react-core';
99

1010
export const CompassBasic: React.FunctionComponent = () => {
11-
const headerContent = <CompassHeader logo={<div>Logo</div>} nav={<div>Nav</div>} profile={<div>Profile</div>} />;
12-
const panelStartContent = <div>Panel start</div>;
11+
const headerContent = (
12+
<CompassHeader logo={<div>Logo</div>} nav={<CompassSection>Nav</CompassSection>} profile={<div>Profile</div>} />
13+
);
14+
const panelStartContent = <CompassSection>Panel start</CompassSection>;
1315
const mainContent = (
1416
<>
1517
<CompassHero>
@@ -21,8 +23,8 @@ export const CompassBasic: React.FunctionComponent = () => {
2123
</CompassContent>
2224
</>
2325
);
24-
const panelEndContent = <div>Panel end</div>;
25-
const footerContent = <div>Footer</div>;
26+
const panelEndContent = <CompassSection>Panel end</CompassSection>;
27+
const footerContent = <CompassSection>Footer</CompassSection>;
2628

2729
return (
2830
<Compass

packages/react-core/src/components/Compass/examples/CompassDemo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/o
2424
export const CompassBasic: React.FunctionComponent = () => {
2525
const subTabs = (
2626
<CompassSection isGlass>
27-
<Tabs activeKey={0} isSubtab onSelect={() => {}}>
27+
<Tabs activeKey={0} isSubtab onSelect={() => {}} aria-label="Compass navigation subtabs">
2828
<Tab eventKey={0} title={<TabTitleText>Subtab 1</TabTitleText>} />
2929
<Tab eventKey={1} title={<TabTitleText>Subtab 2</TabTitleText>} />
3030
<Tab eventKey={2} title={<TabTitleText>Disabled Subtab 3</TabTitleText>} isDisabled />
@@ -35,7 +35,7 @@ export const CompassBasic: React.FunctionComponent = () => {
3535
const navContent = (
3636
<CompassSection isGlass>
3737
<Tabs activeKey={0} onSelect={() => {}} component={TabsComponent.nav} aria-label="Compass navigation tabs">
38-
<Tab eventKey={0} title={<TabTitleText>Tab 1</TabTitleText>}>
38+
<Tab eventKey={0} title={<TabTitleText>Tab 1</TabTitleText>} aria-label="Compass tab with subtabs">
3939
{subTabs}
4040
</Tab>
4141
<Tab eventKey={1} title={<TabTitleText>Tab 2</TabTitleText>} />

0 commit comments

Comments
 (0)