diff --git a/.changeset/eleven-humans-sneeze.md b/.changeset/eleven-humans-sneeze.md new file mode 100644 index 00000000000..e881e43ce14 --- /dev/null +++ b/.changeset/eleven-humans-sneeze.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +PageLayout.Content no longer renders as `main` by default. Instead, developers may add a `main` landmark within `Pagelayout.Content` themselves. diff --git a/src/PageLayout/PageLayout.test.tsx b/src/PageLayout/PageLayout.test.tsx index 1ab69e8a5c1..57552103db2 100644 --- a/src/PageLayout/PageLayout.test.tsx +++ b/src/PageLayout/PageLayout.test.tsx @@ -123,7 +123,9 @@ describe('PageLayout', () => { Header - Content + +
Content
+
Pane Footer
@@ -154,7 +156,7 @@ describe('PageLayout', () => { ) expect(screen.getByRole('banner')).toHaveAccessibleName('header') - expect(screen.getByRole('main')).toHaveAccessibleName('content') + expect(screen.getByLabelText('content')).toBeInTheDocument() expect(screen.getByRole('contentinfo')).toHaveAccessibleName('footer') }) diff --git a/src/PageLayout/PageLayout.tsx b/src/PageLayout/PageLayout.tsx index cda091d97fc..b4c89fd7916 100644 --- a/src/PageLayout/PageLayout.tsx +++ b/src/PageLayout/PageLayout.tsx @@ -421,7 +421,6 @@ const Content: React.FC> = ({ return ( ( diff --git a/src/PageLayout/__snapshots__/PageLayout.test.tsx.snap b/src/PageLayout/__snapshots__/PageLayout.test.tsx.snap index 97b5bfbea64..30144461b0c 100644 --- a/src/PageLayout/__snapshots__/PageLayout.test.tsx.snap +++ b/src/PageLayout/__snapshots__/PageLayout.test.tsx.snap @@ -199,7 +199,7 @@ exports[`PageLayout renders condensed layout 1`] = `
-
-
+
@@ -493,7 +493,7 @@ exports[`PageLayout renders default layout 1`] = `
-
-
+
@@ -787,7 +787,7 @@ exports[`PageLayout renders pane in different position when narrow 1`] = `
-
-
+
@@ -1081,7 +1081,7 @@ exports[`PageLayout renders with dividers 1`] = `
-
-
+
diff --git a/src/SplitPageLayout/__snapshots__/SplitPageLayout.test.tsx.snap b/src/SplitPageLayout/__snapshots__/SplitPageLayout.test.tsx.snap index c35d5dc97cd..1486e3792bb 100644 --- a/src/SplitPageLayout/__snapshots__/SplitPageLayout.test.tsx.snap +++ b/src/SplitPageLayout/__snapshots__/SplitPageLayout.test.tsx.snap @@ -234,7 +234,7 @@ exports[`SplitPageLayout renders default layout 1`] = `
-
-
+