]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18151 [1099147] Incorrect semantic markup
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>
Mon, 16 Jan 2023 11:20:18 +0000 (12:20 +0100)
committersonartech <sonartech@sonarsource.com>
Tue, 17 Jan 2023 20:02:59 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogContainer-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileInheritance-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/ProfilesListHeader-test.tsx.snap

index 058f4d5bbfa755e70461e32e8e4e99b2ec1b1a36..f83c99f057cfc0102ba4a3e5804da097b1b3cf96 100644 (file)
@@ -228,7 +228,7 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
     const hasTypeData = !ruleDetails.isExternal || ruleDetails.type !== 'UNKNOWN';
     return (
       <div className="js-rule-meta">
-        <header className="page-header">
+        <div className="page-header">
           <div className="pull-right">
             {this.renderKey()}
             {!ruleDetails.isExternal && (
@@ -247,7 +247,7 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
           <h3 className="page-title coding-rules-detail-header">
             <big>{ruleDetails.name}</big>
           </h3>
-        </header>
+        </div>
 
         {hasTypeData && (
           <ul className="coding-rules-detail-properties">
index 94f8953d08518b9a89f02a634a9c071369bdd569..9deaf6ffae98176478b119f66d6cba9fcc04e73b 100644 (file)
@@ -4,7 +4,7 @@ exports[`should display right meta info 1`] = `
 <div
   className="js-rule-meta"
 >
-  <header
+  <div
     className="page-header"
   >
     <div
@@ -53,7 +53,7 @@ exports[`should display right meta info 1`] = `
         Deprecated code should be removed
       </big>
     </h3>
-  </header>
+  </div>
   <ul
     className="coding-rules-detail-properties"
   >
@@ -133,7 +133,7 @@ exports[`should display right meta info 2`] = `
 <div
   className="js-rule-meta"
 >
-  <header
+  <div
     className="page-header"
   >
     <div
@@ -152,7 +152,7 @@ exports[`should display right meta info 2`] = `
         xoo:OneExternalIssuePerLine
       </big>
     </h3>
-  </header>
+  </div>
 </div>
 `;
 
@@ -160,7 +160,7 @@ exports[`should display right meta info 3`] = `
 <div
   className="js-rule-meta"
 >
-  <header
+  <div
     className="page-header"
   >
     <div
@@ -179,7 +179,7 @@ exports[`should display right meta info 3`] = `
         One external issue per line
       </big>
     </h3>
-  </header>
+  </div>
   <ul
     className="coding-rules-detail-properties"
   >
index 649615fdcc1647948eca2aa692b5178492ff562f..fa77e1d3b4db98a2d8f4bdcfbe7f333963b62765 100644 (file)
@@ -31,7 +31,7 @@ interface Props {
 
 export default function ListHeader({ canCreate, refreshQualityGates }: Props) {
   return (
-    <header className="page-header">
+    <div className="page-header">
       {canCreate && (
         <div className="page-actions">
           <ModalButton
@@ -61,6 +61,6 @@ export default function ListHeader({ canCreate, refreshQualityGates }: Props) {
           ]}
         />
       </div>
-    </header>
+    </div>
   );
 }
index 17f0cf3ce2865630b07ae92449f29d18aff4b0f1..63863e966c97bb5d974661874682184dc3de44c2 100644 (file)
@@ -138,7 +138,7 @@ export class ChangelogContainer extends React.PureComponent<Props, State> {
 
     return (
       <div className="boxed-group boxed-group-inner js-profile-changelog">
-        <header className="spacer-bottom">
+        <div className="spacer-bottom">
           <ChangelogSearch
             dateRange={{
               from: query.since ? parseDate(query.since) : undefined,
@@ -147,9 +147,8 @@ export class ChangelogContainer extends React.PureComponent<Props, State> {
             onDateRangeChange={this.handleDateRangeChange}
             onReset={this.handleReset}
           />
-
           <DeferredSpinner loading={this.state.loading} className="spacer-left" />
-        </header>
+        </div>
 
         {this.state.events != null && this.state.events.length === 0 && <ChangelogEmpty />}
 
index a42e82c92c5a14a5d130cd3fb309001cf9d03da1..b9549ee78b8417e5747229b697a06fef76874c10 100644 (file)
@@ -4,7 +4,7 @@ exports[`should render correctly 1`] = `
 <div
   className="boxed-group boxed-group-inner js-profile-changelog"
 >
-  <header
+  <div
     className="spacer-bottom"
   >
     <ChangelogSearch
@@ -21,7 +21,7 @@ exports[`should render correctly 1`] = `
       className="spacer-left"
       loading={false}
     />
-  </header>
+  </div>
   <Changelog
     events={
       [
@@ -72,7 +72,7 @@ exports[`should render correctly without events 1`] = `
 <div
   className="boxed-group boxed-group-inner js-profile-changelog"
 >
-  <header
+  <div
     className="spacer-bottom"
   >
     <ChangelogSearch
@@ -89,7 +89,7 @@ exports[`should render correctly without events 1`] = `
       className="spacer-left"
       loading={false}
     />
-  </header>
+  </div>
   <ChangelogEmpty />
 </div>
 `;
index 59d22cab1330216c20918edd9bfb73c74019397c..3703109b492c250302cb37c131740bafcfd98fbb 100644 (file)
@@ -96,16 +96,14 @@ class ComparisonContainer extends React.PureComponent<Props, State> {
 
     return (
       <div className="boxed-group boxed-group-inner js-profile-comparison">
-        <header>
-          <ComparisonForm
-            onCompare={this.handleCompare}
-            profile={profile}
-            profiles={profiles}
-            withKey={withKey}
-          />
+        <ComparisonForm
+          onCompare={this.handleCompare}
+          profile={profile}
+          profiles={profiles}
+          withKey={withKey}
+        />
 
-          {this.state.loading && <i className="spinner spacer-left" />}
-        </header>
+        {this.state.loading && <i className="spinner spacer-left" />}
 
         {this.hasResults(this.state) && (
           <div className="spacer-top">
index 3e6eec3d7d8fabef3c185d389bbb2ce902eae3a7..31a5e739521105084f0ea85e873fcde4cd61c393 100644 (file)
@@ -127,9 +127,9 @@ export default class ProfileInheritance extends React.PureComponent<Props, State
           </div>
         )}
 
-        <header className="boxed-group-header">
+        <div className="boxed-group-header">
           <h2>{translate('quality_profiles.profile_inheritance')}</h2>
-        </header>
+        </div>
 
         <div className="boxed-group-inner">
           {this.state.loading ? (
index 9eff32909b25851d8b20bc1db227ff8ee61fcf72..150831cc08e8213ce755868548d8a83907d478a3 100644 (file)
@@ -4,13 +4,13 @@ exports[`should render correctly 1`] = `
 <div
   className="boxed-group quality-profile-inheritance"
 >
-  <header
+  <div
     className="boxed-group-header"
   >
     <h2>
       quality_profiles.profile_inheritance
     </h2>
-  </header>
+  </div>
   <div
     className="boxed-group-inner"
   >
@@ -58,13 +58,13 @@ exports[`should render modal correctly 1`] = `
 <div
   className="boxed-group quality-profile-inheritance"
 >
-  <header
+  <div
     className="boxed-group-header"
   >
     <h2>
       quality_profiles.profile_inheritance
     </h2>
-  </header>
+  </div>
   <div
     className="boxed-group-inner"
   >
index 5f1abf2b1ccd4c6d9e4f36f061b4963630c3d034..ab67a194c9e017f683469e0c1c38379e8be60c1d 100644 (file)
@@ -49,7 +49,7 @@ export class ProfilesListHeader extends React.PureComponent<Props> {
     }));
 
     return (
-      <header className="quality-profiles-list-header clearfix">
+      <div className="quality-profiles-list-header clearfix">
         <label htmlFor="quality-profiles-filter-input" className="spacer-right">
           {translate('quality_profiles.filter_by')}:
         </label>
@@ -64,7 +64,7 @@ export class ProfilesListHeader extends React.PureComponent<Props> {
           isSearchable={true}
           value={options.filter((o) => o.value === currentFilter)}
         />
-      </header>
+      </div>
     );
   }
 }
index 7b85f20efbf5d5a9a734db6aae8001fbf51cd961..82c185c43a3baeb15f3431c235a1ca564bc02531 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly 1`] = `
-<header
+<div
   className="quality-profiles-list-header clearfix"
 >
   <label
@@ -33,5 +33,5 @@ exports[`should render correctly 1`] = `
     }
     value={[]}
   />
-</header>
+</div>
 `;