diff options
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx | 1 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap | 6 |
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" |