]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19524 Don't render h1 as a child of h2
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Tue, 13 Jun 2023 11:36:50 +0000 (13:36 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 13 Jun 2023 20:03:39 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx
server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanel.tsx
server/sonar-web/src/main/js/apps/overview/components/QualityGateStatusTitle.tsx
server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx

index 2473714bff1df584b66f62c9bb2aa3511cc67ca8..47ede69bd925166566d7d6a1db8b84cec80d6128 100644 (file)
@@ -92,7 +92,7 @@ export function ActivityPanel(props: ActivityPanelProps) {
 
   return (
     <div className="sw-mt-8">
-      <PageTitle text={translate('overview.activity')} />
+      <PageTitle as="h2" text={translate('overview.activity')} />
       <Card className="overview-panel sw-mt-4" data-test="overview__activity-panel">
         <GraphsHeader graph={graph} metrics={metrics} onUpdateGraph={props.onGraphChange} />
         <GraphsHistory
index 1cbfcaafef27d0ecad53443bfc97f73fea483894..f8b0e30662d9e0f59dab6464606859778d6c0331 100644 (file)
@@ -119,9 +119,9 @@ export function MeasuresPanel(props: MeasuresPanelProps) {
       <div className="sw-float-right -sw-mt-6">
         <ComponentReportActions component={component} branch={branch} />
       </div>
-      <h2 className="sw-flex sw-mb-4">
-        <PageTitle text={translate('overview.measures')} />
-      </h2>
+      <div className="sw-flex sw-mb-4">
+        <PageTitle as="h2" text={translate('overview.measures')} />
+      </div>
 
       {loading ? (
         <div>
index c5078fe5e4d483af30503fd919dbd73f06fca0a0..9f31a4298ad6588eec3cf09b38b23e9213031ede 100644 (file)
@@ -26,15 +26,15 @@ import { translate } from '../../../helpers/l10n';
 export function QualityGateStatusTitle() {
   return (
     <div className="sw-flex sw-items-center sw-mb-4">
-      <h2 className="sw-flex sw-items-center">
-        <PageTitle text={translate('overview.quality_gate.status')} />
+      <div className="sw-flex sw-items-center">
+        <PageTitle as="h2" text={translate('overview.quality_gate.status')} />
         <HelpTooltip
           className="sw-ml-2"
           overlay={<div className="sw-my-4">{translate('overview.quality_gate.help')}</div>}
         >
           <HelperHintIcon aria-label="help-tooltip" />
         </HelpTooltip>
-      </h2>
+      </div>
     </div>
   );
 }
index 5a249bbd76a08b394264b5f42d0f2157f93b8848..7bb2f167366a81e3f4b1f3b3c2ce0d055a5b2192 100644 (file)
@@ -231,9 +231,9 @@ export class PullRequestOverview extends React.PureComponent<Props, State> {
             </div>
 
             <div className="sw-flex-1">
-              <h2 className="sw-body-md-highlight">
-                <PageTitle text={translate('overview.measures')} />
-              </h2>
+              <div className="sw-body-md-highlight">
+                <PageTitle as="h2" text={translate('overview.measures')} />
+              </div>
 
               <div className="sw-grid sw-grid-cols-2 sw-gap-4 sw-mt-4">
                 {[