aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorGuillaume Peoc'h <guillaume.peoch@sonarsource.com>2022-08-11 10:02:51 +0200
committersonartech <sonartech@sonarsource.com>2022-08-11 20:03:48 +0000
commitee4d9a0f97119ac1b550fdeb8e6ffb30d1e8a0d9 (patch)
treeafc75dac79b8335afe2ac37ebace257616516e1b /server/sonar-web
parent529d060d1940cd81abefa325ea31014ea57503f3 (diff)
downloadsonarqube-ee4d9a0f97119ac1b550fdeb8e6ffb30d1e8a0d9.tar.gz
sonarqube-ee4d9a0f97119ac1b550fdeb8e6ffb30d1e8a0d9.zip
SONAR-16782 [893472] State: Selected state of the element is missing or incorrect
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx1
-rw-r--r--server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap6
2 files changed, 7 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx b/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx
index c2c7060fa50..53682deec15 100644
--- a/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx
+++ b/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx
@@ -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)}
diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap
index 1f423bd4af0..e5c5524e456 100644
--- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap
@@ -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"