]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16782 [893472] State: Selected state of the element is missing or incorrect
authorGuillaume Peoc'h <guillaume.peoch@sonarsource.com>
Thu, 11 Aug 2022 08:02:51 +0000 (10:02 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 11 Aug 2022 20:03:48 +0000 (20:03 +0000)
server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx
server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap

index c2c7060fa50d790f81d71ff44faef8f3589dc2db..53682deec152cab064ad9abfb2cff784a8b9afcb 100644 (file)
@@ -84,6 +84,7 @@ export default function BoxedTabs<K>(props: BoxedTabsProps<K>) {
       {tabs.map(({ key, label }, i) => (
         <StyledTab
           active={selected === key}
+          aria-current={selected === key}
           // eslint-disable-next-line react/no-array-index-key
           key={i}
           onClick={() => selected !== key && props.onSelect(key)}
index 1f423bd4af04e0b1b95c0ff20044ab4be213f90c..e5c5524e456083de4491ea8918ad9cb083101ac7 100644 (file)
@@ -299,6 +299,7 @@ exports[`should render correctly 1`] = `
     >
       <Styled(button)
         active={true}
+        aria-current={true}
         key="0"
         onClick={[Function]}
         type="button"
@@ -509,6 +510,7 @@ exports[`should render correctly 1`] = `
           }
         />
         <button
+          aria-current={true}
           className="emotion-1"
           onClick={[Function]}
           type="button"
@@ -715,6 +717,7 @@ exports[`should render correctly 1`] = `
       </Styled(button)>
       <Styled(button)
         active={false}
+        aria-current={false}
         key="1"
         onClick={[Function]}
         type="button"
@@ -929,6 +932,7 @@ exports[`should render correctly 1`] = `
           }
         />
         <button
+          aria-current={false}
           className="emotion-3"
           onClick={[Function]}
           type="button"
@@ -1135,6 +1139,7 @@ exports[`should render correctly 1`] = `
       </Styled(button)>
       <Styled(button)
         active={false}
+        aria-current={false}
         key="2"
         onClick={[Function]}
         type="button"
@@ -1349,6 +1354,7 @@ exports[`should render correctly 1`] = `
           }
         />
         <button
+          aria-current={false}
           className="emotion-3"
           onClick={[Function]}
           type="button"