From 9753e328b35e74eb179a9979e6b170bfc482b94c Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Fri, 10 Mar 2023 10:54:27 +1000 Subject: [PATCH 1/3] SegmentedControlIconButton: Remove tooltip (for now) and accessible name to the button --- .../SegmentedControlIconButton.tsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/SegmentedControl/SegmentedControlIconButton.tsx b/src/SegmentedControl/SegmentedControlIconButton.tsx index ad506696ac4..0e0b3cdcd4f 100644 --- a/src/SegmentedControl/SegmentedControlIconButton.tsx +++ b/src/SegmentedControl/SegmentedControlIconButton.tsx @@ -45,17 +45,17 @@ export const SegmentedControlIconButton: React.FC - - - - - - - + {/* TODO: Once the tooltip remediations are resolved (especially https://github.com/github/primer/issues/1909) - bring it back */} + + + + + ) } From 186805d561fddab82e5af729b197ef1a4a010f11 Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Fri, 10 Mar 2023 11:02:44 +1000 Subject: [PATCH 2/3] add changeset --- .changeset/violet-phones-notice.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/violet-phones-notice.md diff --git a/.changeset/violet-phones-notice.md b/.changeset/violet-phones-notice.md new file mode 100644 index 00000000000..7f5a91e04ca --- /dev/null +++ b/.changeset/violet-phones-notice.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +SegmentedControl: Resolve axe-violation by adding a discernible text to the icon button and removing the tooltip until it is marked as accessible From ffe3fea8f996640e7f49e459377ca78cfdab37f3 Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Fri, 10 Mar 2023 11:27:37 +1000 Subject: [PATCH 3/3] remove unused import --- src/SegmentedControl/SegmentedControlIconButton.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SegmentedControl/SegmentedControlIconButton.tsx b/src/SegmentedControl/SegmentedControlIconButton.tsx index 0e0b3cdcd4f..f9ec02520fd 100644 --- a/src/SegmentedControl/SegmentedControlIconButton.tsx +++ b/src/SegmentedControl/SegmentedControlIconButton.tsx @@ -3,7 +3,6 @@ import {IconProps} from '@primer/octicons-react' import styled from 'styled-components' import sx, {merge, SxProp} from '../sx' import {getSegmentedControlButtonStyles, getSegmentedControlListItemStyles} from './getSegmentedControlStyles' -import Tooltip from '../Tooltip' import Box from '../Box' import {defaultSxProp} from '../utils/defaultSxProp'