]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18381 Improve landmark and heading level
authorMathieu Suen <mathieu.suen@sonarsource.com>
Wed, 1 Feb 2023 15:37:22 +0000 (16:37 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 3 Feb 2023 20:02:53 +0000 (20:02 +0000)
38 files changed:
server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/ProjectAdminContainer-test.tsx.snap
server/sonar-web/src/main/js/apps/account/Account.tsx
server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap
server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx
server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureOverview-test.tsx.snap
server/sonar-web/src/main/js/apps/groups/components/App.tsx
server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/marketplace/App.tsx
server/sonar-web/src/main/js/apps/marketplace/Header.tsx
server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/Header-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/components/App.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/PermissionTemplatesApp.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx
server/sonar-web/src/main/js/apps/projectsManagement/ProjectManagementApp.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/SettingsAppRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/system/components/App.tsx
server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/users/UsersApp.tsx
server/sonar-web/src/main/js/apps/users/__tests__/__snapshots__/UsersApp-test.tsx.snap

index e25fe8c69b0fd95735c80eb9156766f6ef8ff363..5d1ded1dc5b08ad30c8b353e928f600195dbfdc2 100644 (file)
@@ -54,10 +54,10 @@ export class ProjectAdminContainer extends React.PureComponent<Props> {
     }
 
     return (
-      <>
+      <main>
         <A11ySkipTarget anchor="admin_main" />
         <Outlet />
-      </>
+      </main>
     );
   }
 }
index c3f74fb0aa781f625eb473604e58a168ad7c816f..0d01829fb3b1e2d70c0b68ba17f1767f848439ea 100644 (file)
@@ -1,10 +1,10 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly 1`] = `
-<Fragment>
+<main>
   <A11ySkipTarget
     anchor="admin_main"
   />
   <Outlet />
-</Fragment>
+</main>
 `;
index 56528dc90c035dd1ee5144bf05810bc3132d42c4..89c44b98f9ad5a2dc63b98aa121d37155db0c827 100644 (file)
@@ -61,7 +61,9 @@ export class Account extends React.PureComponent<Props> {
           </div>
         </header>
 
-        <Outlet />
+        <main>
+          <Outlet />
+        </main>
       </div>
     );
   }
index fd5cbcd1a66206355ac3d1c06a0079b96246218e..c9a3479dce98d914a3b9a29ccf0f174a898d19b2 100644 (file)
@@ -72,12 +72,12 @@ export default function AuditAppRenderer(props: AuditAppRendererProps) {
   const { dateRange, downloadStarted, housekeepingPolicy, selection } = props;
 
   return (
-    <div className="page page-limited" id="marketplace-page">
+    <main className="page page-limited" id="marketplace-page">
       <Suggestions suggestions="audit-logs" />
       <Helmet title={translate('audit_logs.page')} />
 
       <header className="page-header">
-        <h1 className="page-title">{translate('audit_logs.page')}</h1>
+        <h2 className="page-title">{translate('audit_logs.page')}</h2>
       </header>
 
       <p className="big-spacer-bottom">
@@ -104,7 +104,7 @@ export default function AuditAppRenderer(props: AuditAppRendererProps) {
       </p>
 
       <div className="huge-spacer-bottom">
-        <h2 className="big-spacer-bottom">{translate('audit_logs.download')}</h2>
+        <h3 className="big-spacer-bottom">{translate('audit_logs.download')}</h3>
 
         <ul>
           {getRangeOptions(housekeepingPolicy).map((option) => (
@@ -134,6 +134,6 @@ export default function AuditAppRenderer(props: AuditAppRendererProps) {
         onStartDownload={props.handleStartDownload}
         selection={selection}
       />
-    </div>
+    </main>
   );
 }
index aadcc2704a8547ceaff048517cbc962221c1084d..430a327776f0b2798ee84573a40d96b9e6a797af 100644 (file)
@@ -229,7 +229,7 @@ export class BackgroundTasksApp extends React.PureComponent<Props, State> {
     const query = this.props.location.query.query || '';
 
     return (
-      <div className="page page-limited">
+      <main className="page page-limited">
         <Suggestions suggestions="background_tasks" />
         <Helmet defer={false} title={translate('background_tasks.page')} />
         <Header component={component} />
@@ -272,7 +272,7 @@ export class BackgroundTasksApp extends React.PureComponent<Props, State> {
           pageSize={pagination.pageSize}
           total={pagination.total}
         />
-      </div>
+      </main>
     );
   }
 }
index afb200f89f2bc876d04ce53105eee675928f9891..d6a88662327faebdba22524ac084f971b3a800b2 100644 (file)
@@ -11,7 +11,7 @@ exports[`should render correctly: initial 1`] = `
 `;
 
 exports[`should render correctly: loaded 1`] = `
-<div
+<main
   className="page page-limited"
 >
   <Suggestions
@@ -190,5 +190,5 @@ exports[`should render correctly: loaded 1`] = `
     loading={false}
     total={2}
   />
-</div>
+</main>
 `;
index 646599998aa83ceeb1799f87b07ce07b1f38d16c..5bd09e3c39d5483d5933855811675f5633e85681 100644 (file)
@@ -292,7 +292,7 @@ class CodeApp extends React.Component<Props, State> {
     const isPortfolio = isPortfolioLike(qualifier);
 
     return (
-      <div className="page page-limited">
+      <main className="page page-limited">
         <A11ySkipTarget anchor="code_main" />
         {!canBrowseAllChildProjects && isPortfolio && (
           <StyledAlert variant="warning" className="it__portfolio_warning">
@@ -394,7 +394,7 @@ class CodeApp extends React.Component<Props, State> {
             </div>
           )}
         </div>
-      </div>
+      </main>
     );
   }
 }
index 95f89618efb05773f50bfa0f19e68bdb3bc024df..66e7210d3b27de15aed6efb6eeedd16cce85bd3d 100644 (file)
@@ -602,7 +602,7 @@ export class App extends React.PureComponent<Props, State> {
             )}
           </ScreenPositionHelper>
 
-          <div className="layout-page-main">
+          <main className="layout-page-main">
             <div className="layout-page-header-panel layout-page-main-header">
               <div className="layout-page-header-panel-inner layout-page-main-header-inner">
                 <div className="layout-page-main-inner">
@@ -673,7 +673,7 @@ export class App extends React.PureComponent<Props, State> {
                 </>
               )}
             </div>
-          </div>
+          </main>
         </div>
       </>
     );
index 59f49c690c4e994bc6d57586052f5e4b80997e1f..58ab4ac91cd9bcae2e2dc6aad0078d8a6ab00d7e 100644 (file)
@@ -205,7 +205,7 @@ exports[`should render correctly: loaded 1`] = `
     >
       <Component />
     </ScreenPositionHelper>
-    <div
+    <main
       className="layout-page-main"
     >
       <div
@@ -330,7 +330,7 @@ exports[`should render correctly: loaded 1`] = `
           total={0}
         />
       </div>
-    </div>
+    </main>
   </div>
 </Fragment>
 `;
@@ -360,7 +360,7 @@ exports[`should render correctly: loading 1`] = `
     >
       <Component />
     </ScreenPositionHelper>
-    <div
+    <main
       className="layout-page-main"
     >
       <div
@@ -389,7 +389,7 @@ exports[`should render correctly: loading 1`] = `
       >
         <ul />
       </div>
-    </div>
+    </main>
   </div>
 </Fragment>
 `;
index 22252b9d61f6c815ba4cf73a7a3c83cfd09691c5..922fa2d0906634e1ce20aacb2feaf11fda57f08c 100644 (file)
@@ -265,11 +265,11 @@ export class App extends React.PureComponent<Props, State> {
 
     if (hideDrilldown) {
       return (
-        <div className="layout-page-main">
+        <main className="layout-page-main">
           <div className="layout-page-main-inner">
             <div className="note">{translate('component_measures.details_are_not_available')}</div>
           </div>
-        </div>
+        </main>
       );
     }
 
index ff194a1834cfe8e4ccca97bd186032e347c2f1ee..501ec9fac2eb237868d8372c949c739c190e3157 100644 (file)
@@ -154,7 +154,7 @@ export default class MeasureOverview extends React.PureComponent<Props, State> {
     const { branchLike, className, component, leakPeriod, loading, rootComponent } = this.props;
     const displayLeak = hasFullMeasures(branchLike);
     return (
-      <div className={className}>
+      <main className={className}>
         <div className="layout-page-header-panel layout-page-main-header">
           <A11ySkipTarget anchor="measures_main" />
 
@@ -190,7 +190,7 @@ export default class MeasureOverview extends React.PureComponent<Props, State> {
           <DeferredSpinner loading={loading} />
           {!loading && this.renderContent()}
         </div>
-      </div>
+      </main>
     );
   }
 }
index 17e692d4ad3231a8ae177d6d263ab4eed4c8d9f4..523e596b8715ce5521507000bd17977c0a598af5 100644 (file)
@@ -21,7 +21,7 @@ exports[`should not render drilldown for estimated duplications 1`] = `
     >
       <Component />
     </ScreenPositionHelper>
-    <div
+    <main
       className="layout-page-main"
     >
       <div
@@ -33,7 +33,7 @@ exports[`should not render drilldown for estimated duplications 1`] = `
           component_measures.details_are_not_available
         </div>
       </div>
-    </div>
+    </main>
   </div>
 </div>
 `;
index 002e5241a1591d5c9fb2721c05d5db749332a038..56095ad8c017b132ef7c7bc2368ca26b5044daf2 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly: default 1`] = `
-<div>
+<main>
   <div
     className="layout-page-header-panel layout-page-main-header"
   >
@@ -104,11 +104,11 @@ exports[`should render correctly: default 1`] = `
       updateSelected={[MockFunction]}
     />
   </div>
-</div>
+</main>
 `;
 
 exports[`should render correctly: has leak period 1`] = `
-<div>
+<main>
   <div
     className="layout-page-header-panel layout-page-main-header"
   >
@@ -252,11 +252,11 @@ exports[`should render correctly: has leak period 1`] = `
       updateSelected={[MockFunction]}
     />
   </div>
-</div>
+</main>
 `;
 
 exports[`should render correctly: is file 1`] = `
-<div>
+<main>
   <div
     className="layout-page-header-panel layout-page-main-header"
   >
@@ -337,11 +337,11 @@ exports[`should render correctly: is file 1`] = `
       />
     </div>
   </div>
-</div>
+</main>
 `;
 
 exports[`should render correctly: loading 1`] = `
-<div>
+<main>
   <div
     className="layout-page-header-panel layout-page-main-header"
   >
@@ -410,5 +410,5 @@ exports[`should render correctly: loading 1`] = `
       loading={true}
     />
   </div>
-</div>
+</main>
 `;
index e26520e4aa30660a08a786cde222f6bf57839586..e282044653b1502e1c248d0440aad7dadc52cd11 100644 (file)
@@ -196,7 +196,7 @@ export default class App extends React.PureComponent<{}, State> {
       <>
         <Suggestions suggestions="user_groups" />
         <Helmet defer={false} title={translate('user_groups.page')} />
-        <div className="page page-limited" id="groups-page">
+        <main className="page page-limited" id="groups-page">
           <Header onCreate={this.handleCreate} />
 
           <SearchBox
@@ -247,7 +247,7 @@ export default class App extends React.PureComponent<{}, State> {
               onSubmit={this.handleEdit}
             />
           )}
-        </div>
+        </main>
       </>
     );
   }
index 7a517e9757371abcd629397d0c0c24edd1d2592e..a06d0810832d7070c3c1c9570a4fc1714be9fb0d 100644 (file)
@@ -11,7 +11,7 @@ exports[`should render correctly 1`] = `
     prioritizeSeoTags={false}
     title="user_groups.page"
   />
-  <div
+  <main
     className="page page-limited"
     id="groups-page"
   >
@@ -26,7 +26,7 @@ exports[`should render correctly 1`] = `
       placeholder="search.search_by_name"
       value=""
     />
-  </div>
+  </main>
 </Fragment>
 `;
 
@@ -41,7 +41,7 @@ exports[`should render correctly 2`] = `
     prioritizeSeoTags={false}
     title="user_groups.page"
   />
-  <div
+  <main
     className="page page-limited"
     id="groups-page"
   >
@@ -89,6 +89,6 @@ exports[`should render correctly 2`] = `
         total={5}
       />
     </div>
-  </div>
+  </main>
 </Fragment>
 `;
index b47eff4686076b9aaef8d0db6af6c68ce95e2217..52dd3a65eeb2d8e27afd5248e5b246021dc76127 100644 (file)
@@ -156,13 +156,13 @@ export class App extends React.PureComponent<Props, State> {
       riskConsent === RiskConsent.Accepted;
 
     return (
-      <div className="page page-limited" id="marketplace-page">
+      <main className="page page-limited" id="marketplace-page">
         <Suggestions suggestions="marketplace" />
         <Helmet title={translate('marketplace.page')} />
         <Header currentEdition={currentEdition} />
         <EditionBoxes currentEdition={currentEdition} />
         <header className="page-header">
-          <h1 className="page-title">{translate('marketplace.page.plugins')}</h1>
+          <h2 className="page-title">{translate('marketplace.page.plugins')}</h2>
           <div className="page-description">
             <p>{translate('marketplace.page.plugins.description')}</p>
             {currentEdition !== EditionKey.community && (
@@ -209,7 +209,7 @@ export class App extends React.PureComponent<Props, State> {
             </>
           )}
         </DeferredSpinner>
-      </div>
+      </main>
     );
   }
 }
index 209ea4f41fc0786f123817e200759f3b558e5f30..883121025895fe8b3d154626547687c52855b5f5 100644 (file)
@@ -28,7 +28,7 @@ interface Props {
 export default function Header({ currentEdition }: Props) {
   return (
     <header className="page-header" id="marketplace-header">
-      <h1 className="page-title">{translate('marketplace.page')}</h1>
+      <h2 className="page-title">{translate('marketplace.page')}</h2>
       {currentEdition && (
         <h3 className="page-description">
           {translate('marketplace.page.you_are_running', currentEdition)}
index a17030467b42246e711d2da008fb5f0fdf975beb..423ae4b0dd4ac02ad2d55546515b847a1cb175cb 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly: loaded 1`] = `
-<div
+<main
   className="page page-limited"
   id="marketplace-page"
 >
@@ -23,11 +23,11 @@ exports[`should render correctly: loaded 1`] = `
   <header
     className="page-header"
   >
-    <h1
+    <h2
       className="page-title"
     >
       marketplace.page.plugins
-    </h1>
+    </h2>
     <div
       className="page-description"
     >
@@ -94,11 +94,11 @@ exports[`should render correctly: loaded 1`] = `
       total={1}
     />
   </DeferredSpinner>
-</div>
+</main>
 `;
 
 exports[`should render correctly: loading 1`] = `
-<div
+<main
   className="page page-limited"
   id="marketplace-page"
 >
@@ -120,11 +120,11 @@ exports[`should render correctly: loading 1`] = `
   <header
     className="page-header"
   >
-    <h1
+    <h2
       className="page-title"
     >
       marketplace.page.plugins
-    </h1>
+    </h2>
     <div
       className="page-description"
     >
@@ -170,11 +170,11 @@ exports[`should render correctly: loading 1`] = `
   >
     marketplace.plugin_list.no_plugins.all
   </DeferredSpinner>
-</div>
+</main>
 `;
 
 exports[`should render correctly: not readonly 1`] = `
-<div
+<main
   className="page page-limited"
   id="marketplace-page"
 >
@@ -196,11 +196,11 @@ exports[`should render correctly: not readonly 1`] = `
   <header
     className="page-header"
   >
-    <h1
+    <h2
       className="page-title"
     >
       marketplace.page.plugins
-    </h1>
+    </h2>
     <div
       className="page-description"
     >
@@ -250,5 +250,5 @@ exports[`should render correctly: not readonly 1`] = `
       total={1}
     />
   </DeferredSpinner>
-</div>
+</main>
 `;
index 4b6c283ca46646c73dfaad17bd31b9f0a8c62ed9..83e8c3b7b330c38d6fdaca04c513f065d319c3d2 100644 (file)
@@ -5,11 +5,11 @@ exports[`should render with installed editions 1`] = `
   className="page-header"
   id="marketplace-header"
 >
-  <h1
+  <h2
     className="page-title"
   >
     marketplace.page
-  </h1>
+  </h2>
   <h3
     className="page-description"
   >
@@ -28,11 +28,11 @@ exports[`should render with installed editions 2`] = `
   className="page-header"
   id="marketplace-header"
 >
-  <h1
+  <h2
     className="page-title"
   >
     marketplace.page
-  </h1>
+  </h2>
   <h3
     className="page-description"
   >
index 942a3ace000c5b5d0ee8475106320d64b6f5f0dd..8c6efe0b26c090147ec761b19cbc9fb969889ed4 100644 (file)
@@ -56,12 +56,12 @@ export class App extends React.PureComponent<Props> {
     }
 
     return isPullRequest(branchLike) ? (
-      <>
+      <main>
         <Suggestions suggestions="pull_requests" />
         <PullRequestOverview branchLike={branchLike} component={component} />
-      </>
+      </main>
     ) : (
-      <>
+      <main>
         <Suggestions suggestions="overview" />
 
         {!component.analysisDate && (
@@ -82,7 +82,7 @@ export class App extends React.PureComponent<Props> {
             projectBinding={projectBinding}
           />
         )}
-      </>
+      </main>
     );
   }
 }
index b5126094321d3748f090c0b6f5200fef52913be4..e72a1a7e7a49bfdef161424d124f52b8d151deb2 100644 (file)
@@ -19,7 +19,9 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
+import { mockPullRequest } from '../../../../helpers/mocks/branch-like';
 import BranchOverview from '../../branches/BranchOverview';
+import PullRequestOverview from '../../pullRequests/PullRequestOverview';
 import { App } from '../App';
 
 const component = {
@@ -33,6 +35,9 @@ const component = {
 
 it('should render BranchOverview', () => {
   expect(getWrapper().find(BranchOverview).exists()).toBe(true);
+  expect(getWrapper({ branchLike: mockPullRequest() }).find(PullRequestOverview).exists()).toBe(
+    true
+  );
 });
 
 function getWrapper(props = {}) {
index a6691e30792e68cdf63ee2594399b98fa1ea5d69..0a613050b6f3475ee7c0a758dea9c14b978de02a 100644 (file)
@@ -110,13 +110,13 @@ export class PermissionTemplatesApp extends React.PureComponent<Props, State> {
   render() {
     const { id } = this.props.location.query;
     return (
-      <div>
+      <main>
         <Suggestions suggestions="permission_templates" />
         <Helmet defer={false} title={translate('permission_templates.page')} />
 
         {id && this.renderTemplate(id)}
         {!id && this.renderHome()}
-      </div>
+      </main>
     );
   }
 }
index 55df242511c15cccd61d4aab04fe693903377233..5e0c9a0c8a6ee5cc3a570684ba8ca7b3143e2252 100644 (file)
@@ -281,7 +281,7 @@ export class App extends React.PureComponent<Props, State> {
       'global_permissions'
     );
     return (
-      <div className="page page-limited">
+      <main className="page page-limited">
         <Suggestions suggestions="global_permissions" />
         <Helmet defer={false} title={translate('global_permissions.permission')} />
         <PageHeader loading={loading} />
@@ -302,7 +302,7 @@ export class App extends React.PureComponent<Props, State> {
           users={users}
           usersPaging={usersPaging}
         />
-      </div>
+      </main>
     );
   }
 }
index 5017c675591a9fc83e26f1980b0a10ab29498d63..55679b704a02254fe1b5d8faab05c4beee77b049 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly 1`] = `
-<div
+<main
   className="page page-limited"
 >
   <Suggestions
@@ -69,11 +69,11 @@ exports[`should render correctly 1`] = `
     revokePermissionFromUser={[Function]}
     users={[]}
   />
-</div>
+</main>
 `;
 
 exports[`should render correctly 2`] = `
-<div
+<main
   className="page page-limited"
 >
   <Suggestions
@@ -198,5 +198,5 @@ exports[`should render correctly 2`] = `
       }
     }
   />
-</div>
+</main>
 `;
index becf6e59200f7a6d7677ca58b94cec57f555e397..4bb0d646efeb9dc83a07310332ecb6124ee67aa7 100644 (file)
@@ -56,7 +56,7 @@ export default function ProjectActivityAppRenderer(props: Props) {
     (configuration ? configuration.showHistory : false);
   const canDeleteAnalyses = configuration ? configuration.showHistory : false;
   return (
-    <div className="page page-limited" id="project-activity">
+    <main className="page page-limited" id="project-activity">
       <Suggestions suggestions="project_activity" />
       <Helmet defer={false} title={translate('project_activity.page')} />
 
@@ -106,6 +106,6 @@ export default function ProjectActivityAppRenderer(props: Props) {
           />
         </div>
       </div>
-    </div>
+    </main>
   );
 }
index 24b8e7f9ced8b3bf167734a45c9344281dc3e792..2688eeede813139d1d503bf7729fa41b228edc0a 100644 (file)
@@ -204,7 +204,7 @@ export class ProjectManagementApp extends React.PureComponent<Props, State> {
     const { currentUser } = this.props;
     const { defaultProjectVisibility } = this.state;
     return (
-      <div className="page page-limited" id="projects-management-page">
+      <main className="page page-limited" id="projects-management-page">
         <Suggestions suggestions="projects_management" />
         <Helmet defer={false} title={translate('projects_management')} />
 
@@ -258,7 +258,7 @@ export class ProjectManagementApp extends React.PureComponent<Props, State> {
             onProjectCreated={this.requestProjects}
           />
         )}
-      </div>
+      </main>
     );
   }
 }
index 623d21ad35bcc00ee7d816853d4bf39cbc2f15c4..87cb5a6097c8c0d12e0e0b8c2ec97df1a34ada1a 100644 (file)
@@ -123,7 +123,7 @@ class App extends React.PureComponent<Props, State> {
 
           <ScreenPositionHelper className="layout-page-side-outer">
             {({ top }) => (
-              <div className="layout-page-side" style={{ top }}>
+              <nav className="layout-page-side" style={{ top }}>
                 <div className="layout-page-side-inner">
                   <div className="layout-page-filters">
                     <ListHeader
@@ -135,7 +135,7 @@ class App extends React.PureComponent<Props, State> {
                     </DeferredSpinner>
                   </div>
                 </div>
-              </div>
+              </nav>
             )}
           </ScreenPositionHelper>
 
index 1409940c95ce1a7508b9884bfd95d81060415e2f..97f18dc80f0aaa24b00b53e4fcd2e35176d811ad 100644 (file)
@@ -150,7 +150,7 @@ export default class Details extends React.PureComponent<Props, State> {
     const { loading, qualityGate, updatedConditionId } = this.state;
 
     return (
-      <div className="layout-page-main">
+      <main className="layout-page-main">
         <DeferredSpinner loading={loading} timeout={200}>
           {qualityGate && (
             <>
@@ -172,7 +172,7 @@ export default class Details extends React.PureComponent<Props, State> {
             </>
           )}
         </DeferredSpinner>
-      </div>
+      </main>
     );
   }
 }
index ddc968d65a027c877dc4cc3871b672ed8e06754f..5588a4d15b91cf05cb27f57b41cea5ba551f9339 100644 (file)
@@ -64,7 +64,9 @@ export default function ProfileContainer() {
         isComparable={filteredProfiles.length > 1}
         updateProfiles={context.updateProfiles}
       />
-      <Outlet context={{ profile, ...context }} />
+      <main>
+        <Outlet context={{ profile, ...context }} />
+      </main>
     </div>
   );
 }
index 2ca6f42e977bef345abbab385eb9a58f15e6a775..c02116e3877993a413140dcf36a86b4181826288 100644 (file)
@@ -53,7 +53,7 @@ export default function ProfileHeader(props: Props) {
   const isChangeLogPage = location.pathname.endsWith(`/${QualityProfilePath.CHANGELOG}`);
 
   return (
-    <div className="page-header quality-profile-header">
+    <header className="page-header quality-profile-header">
       {(isComparePage || isChangeLogPage) && (
         <Helmet
           defer={false}
@@ -141,6 +141,6 @@ export default function ProfileHeader(props: Props) {
           />
         </div>
       )}
-    </div>
+    </header>
   );
 }
index aef096a04f59dd251857f7655929e38396d4e0c7..e06487ef75b23bb836bce54f219557a66b0d94e5 100644 (file)
@@ -35,12 +35,12 @@ export default function HomeContainer() {
       <PageHeader {...context} />
 
       <div className="page-with-sidebar">
-        <div className="page-main">
+        <main className="page-main">
           <ProfilesList {...context} language={selectedLanguage} />
-        </div>
-        <div className="page-sidebar">
+        </main>
+        <aside className="page-sidebar">
           <Evolution {...context} />
-        </div>
+        </aside>
       </div>
     </div>
   );
index ba8b7c1bd9f441fa292c167484c6b457ba3ade6f..1db2708e3ba73de09f46b059c51ae64cd1cec73b 100644 (file)
@@ -174,7 +174,7 @@ export default function SecurityHotspotsAppRenderer(props: SecurityHotspotsAppRe
               )}
             </ScreenPositionHelper>
 
-            <div className="layout-page-main">
+            <main className="layout-page-main">
               <HotspotViewer
                 component={component}
                 hotspotKey={selectedHotspot.key}
@@ -184,7 +184,7 @@ export default function SecurityHotspotsAppRenderer(props: SecurityHotspotsAppRe
                 onLocationClick={props.onLocationClick}
                 selectedHotspotLocation={selectedHotspotLocation}
               />
-            </div>
+            </main>
           </div>
         ))}
     </div>
index 3765dd223e916029ad9cf238c389b33d109aae15..9d844cc2133fd62f991cb2319a32751c0cfd40d6 100644 (file)
@@ -67,7 +67,7 @@ export function SettingsAppRenderer(props: SettingsAppRendererProps) {
       (!isProjectSettings && foundAdditionalCategory.availableGlobally));
 
   return (
-    <div id="settings-page">
+    <main id="settings-page">
       <Suggestions suggestions="settings" />
       <Helmet defer={false} title={translate('settings.page')} />
       <PageHeader component={component} definitions={definitions} />
@@ -110,7 +110,7 @@ export function SettingsAppRenderer(props: SettingsAppRendererProps) {
           </div>
         </div>
       </div>
-    </div>
+    </main>
   );
 }
 
index 02bc334676088cca7358fac825f2d0fdf3149b35..491942307b9d9bcc07ed5acec8d3169b314622d7 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render almintegration correctly 1`] = `
-<div
+<main
   id="settings-page"
 >
   <Suggestions
@@ -82,11 +82,11 @@ exports[`should render almintegration correctly 1`] = `
       </div>
     </div>
   </div>
-</div>
+</main>
 `;
 
 exports[`should render default view correctly 1`] = `
-<div
+<main
   id="settings-page"
 >
   <Suggestions
@@ -161,7 +161,7 @@ exports[`should render default view correctly 1`] = `
       </div>
     </div>
   </div>
-</div>
+</main>
 `;
 
 exports[`should render default view correctly: All Categories List 1`] = `
@@ -195,7 +195,7 @@ exports[`should render default view correctly: All Categories List 1`] = `
 `;
 
 exports[`should render exclusions correctly 1`] = `
-<div
+<main
   id="settings-page"
 >
   <Suggestions
@@ -276,11 +276,11 @@ exports[`should render exclusions correctly 1`] = `
       </div>
     </div>
   </div>
-</div>
+</main>
 `;
 
 exports[`should render languages correctly 1`] = `
-<div
+<main
   id="settings-page"
 >
   <Suggestions
@@ -361,11 +361,11 @@ exports[`should render languages correctly 1`] = `
       </div>
     </div>
   </div>
-</div>
+</main>
 `;
 
 exports[`should render new_code_period correctly 1`] = `
-<div
+<main
   id="settings-page"
 >
   <Suggestions
@@ -420,11 +420,11 @@ exports[`should render new_code_period correctly 1`] = `
       </div>
     </div>
   </div>
-</div>
+</main>
 `;
 
 exports[`should render pull_request_decoration_binding correctly 1`] = `
-<div
+<main
   id="settings-page"
 >
   <Suggestions
@@ -499,5 +499,5 @@ exports[`should render pull_request_decoration_binding correctly 1`] = `
       </div>
     </div>
   </div>
-</div>
+</main>
 `;
index 53d20e573aaa0a181e92f625085f17c487cce3d7..7478fdfa5494dfcc0acc2a95af7a806eb7c553a5 100644 (file)
@@ -123,7 +123,7 @@ export class App extends React.PureComponent<Props, State> {
   render() {
     const { loading, sysInfoData } = this.state;
     return (
-      <div className="page page-limited">
+      <main className="page page-limited">
         <Suggestions suggestions="system_info" />
         <Helmet defer={false} title={translate('system_info.page')} />
         <div className="page-notifs">
@@ -143,7 +143,7 @@ export class App extends React.PureComponent<Props, State> {
           />
         )}
         {this.renderSysInfo()}
-      </div>
+      </main>
     );
   }
 }
index 1f62f012092aad64401d3f2643c71bc07ea8b5d5..aeffef45a271110f626ea9a688d5d9c2b8bbb722 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly: cluster sysinfo 1`] = `
-<div
+<main
   className="page page-limited"
 >
   <Suggestions
@@ -190,11 +190,11 @@ exports[`should render correctly: cluster sysinfo 1`] = `
     }
     toggleCard={[Function]}
   />
-</div>
+</main>
 `;
 
 exports[`should render correctly: loading 1`] = `
-<div
+<main
   className="page page-limited"
 >
   <Suggestions
@@ -213,11 +213,11 @@ exports[`should render correctly: loading 1`] = `
       dismissable={false}
     />
   </div>
-</div>
+</main>
 `;
 
 exports[`should render correctly: stand-alone sysinfo 1`] = `
-<div
+<main
   className="page page-limited"
 >
   <Suggestions
@@ -319,5 +319,5 @@ exports[`should render correctly: stand-alone sysinfo 1`] = `
     }
     toggleCard={[Function]}
   />
-</div>
+</main>
 `;
index c2fb58dbcc778caec3ca197df15287722af74143..b0d7c36df4fa5d26112a1fa559dedcb8007a0d3b 100644 (file)
@@ -118,7 +118,7 @@ export class UsersApp extends React.PureComponent<Props, State> {
     const query = parseQuery(this.props.location.query);
     const { loading, paging, users } = this.state;
     return (
-      <div className="page page-limited" id="users-page">
+      <main className="page page-limited" id="users-page">
         <Suggestions suggestions="users" />
         <Helmet defer={false} title={translate('users.page')} />
         <Header loading={loading} onUpdateUsers={this.fetchUsers} />
@@ -138,7 +138,7 @@ export class UsersApp extends React.PureComponent<Props, State> {
             total={paging.total}
           />
         )}
-      </div>
+      </main>
     );
   }
 }
index aee0b17d53a43f6fad596362d7a44f2b71903711..41245b665122fd75b0ff7cfeb9254d1947199019 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly 1`] = `
-<div
+<main
   className="page page-limited"
   id="users-page"
 >
@@ -39,11 +39,11 @@ exports[`should render correctly 1`] = `
     updateTokensCount={[Function]}
     users={[]}
   />
-</div>
+</main>
 `;
 
 exports[`should render correctly 2`] = `
-<div
+<main
   className="page page-limited"
   id="users-page"
 >
@@ -106,5 +106,5 @@ exports[`should render correctly 2`] = `
     ready={true}
     total={2}
   />
-</div>
+</main>
 `;