From 999393eba2c1d6a24e20322dbc41e94cd62d11a8 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Wed, 3 Aug 2022 16:11:29 +0200 Subject: [PATCH] SONAR-16760 [893222] Focus indicator is missing --- .../main/js/components/controls/BoxedTabs.tsx | 4 + .../__snapshots__/BoxedTabs-test.tsx.snap | 264 ++++++++++++++++-- 2 files changed, 244 insertions(+), 24 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 487e119dffe..c2c7060fa50 100644 --- a/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx +++ b/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx @@ -60,6 +60,10 @@ const StyledTab = styled.button<{ active: boolean }>` &:last-child { border-right: ${baseBorder}; } + + &:focus-visible { + outline: 2px dotted ${colors.blue}; + } `; const ActiveBorder = styled.div<{ active: boolean }>` 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 b4af211917e..1f423bd4af0 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 @@ -29,6 +29,10 @@ exports[`should render correctly 1`] = ` border-right: 1px solid #e6e6e6; } +.emotion-1:focus-visible { + outline: 2px dotted #4b9fd5; +} + .emotion-0 { display: block; background-color: #4b9fd5; @@ -62,6 +66,10 @@ exports[`should render correctly 1`] = ` border-right: 1px solid #e6e6e6; } +.emotion-3:focus-visible { + outline: 2px dotted #4b9fd5; +} + .emotion-2 { display: none; background-color: #4b9fd5; @@ -106,9 +114,9 @@ exports[`should render correctly 1`] = ` Object { "insert": [Function], "inserted": Object { - "1kg7pv0": true, - "60rv5s": true, + "1193b7i": true, "ko9asm": true, + "mwuwl": true, "o2j9ze": true, "v2seq5": true, }, @@ -141,6 +149,13 @@ exports[`should render correctly 1`] = ` .emotion-1:last-child{border-right:1px solid #e6e6e6;} + , + , , , + , , , + , , , + , , , + , , , + , , , + , ,