Skip to content

Commit

Permalink
Revert "PageLayout.Content should not use main landmark by default. (#…
Browse files Browse the repository at this point in the history
…3154)"

This reverts commit fed1c57.
  • Loading branch information
broccolinisoup committed Jun 16, 2023
1 parent d39f68a commit 8c2732c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
5 changes: 0 additions & 5 deletions .changeset/eleven-humans-sneeze.md

This file was deleted.

6 changes: 2 additions & 4 deletions src/PageLayout/PageLayout.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ describe('PageLayout', () => {
<ThemeProvider>
<PageLayout>
<PageLayout.Header aria-label="header">Header</PageLayout.Header>
<PageLayout.Content>
<main aria-label="content">Content</main>
</PageLayout.Content>
<PageLayout.Content aria-label="content">Content</PageLayout.Content>
<PageLayout.Pane>Pane</PageLayout.Pane>
<PageLayout.Footer aria-label="footer">Footer</PageLayout.Footer>
</PageLayout>
Expand Down Expand Up @@ -156,7 +154,7 @@ describe('PageLayout', () => {
)

expect(screen.getByRole('banner')).toHaveAccessibleName('header')
expect(screen.getByLabelText('content')).toBeInTheDocument()
expect(screen.getByRole('main')).toHaveAccessibleName('content')
expect(screen.getByRole('contentinfo')).toHaveAccessibleName('footer')
})

Expand Down
1 change: 1 addition & 0 deletions src/PageLayout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ const Content: React.FC<React.PropsWithChildren<PageLayoutContentProps>> = ({

return (
<Box
as="main"
aria-label={label}
aria-labelledby={labelledBy}
sx={merge<BetterSystemStyleObject>(
Expand Down
16 changes: 8 additions & 8 deletions src/PageLayout/__snapshots__/PageLayout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ exports[`PageLayout renders condensed layout 1`] = `
<div
class="c5"
>
<div
<main
class="c6"
>
<div
Expand All @@ -213,7 +213,7 @@ exports[`PageLayout renders condensed layout 1`] = `
<div
class=""
/>
</div>
</main>
<div
class="c8"
>
Expand Down Expand Up @@ -493,7 +493,7 @@ exports[`PageLayout renders default layout 1`] = `
<div
class="c5"
>
<div
<main
class="c6"
>
<div
Expand All @@ -507,7 +507,7 @@ exports[`PageLayout renders default layout 1`] = `
<div
class=""
/>
</div>
</main>
<div
class="c8"
>
Expand Down Expand Up @@ -787,7 +787,7 @@ exports[`PageLayout renders pane in different position when narrow 1`] = `
<div
class="c5"
>
<div
<main
class="c6"
>
<div
Expand All @@ -801,7 +801,7 @@ exports[`PageLayout renders pane in different position when narrow 1`] = `
<div
class=""
/>
</div>
</main>
<div
class="c8"
>
Expand Down Expand Up @@ -1081,7 +1081,7 @@ exports[`PageLayout renders with dividers 1`] = `
<div
class="c5"
>
<div
<main
class="c6"
>
<div
Expand All @@ -1095,7 +1095,7 @@ exports[`PageLayout renders with dividers 1`] = `
<div
class=""
/>
</div>
</main>
<div
class="c8"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ exports[`SplitPageLayout renders default layout 1`] = `
<div
class="c5"
>
<div
<main
class="c6"
>
<div
Expand All @@ -248,7 +248,7 @@ exports[`SplitPageLayout renders default layout 1`] = `
<div
class=""
/>
</div>
</main>
<div
class="c8"
>
Expand Down

0 comments on commit 8c2732c

Please sign in to comment.