diff --git a/.changeset/lemon-rabbits-move.md b/.changeset/lemon-rabbits-move.md new file mode 100644 index 00000000000..3487ba3d934 --- /dev/null +++ b/.changeset/lemon-rabbits-move.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Add support for aria-current styles in high contrast mode for TreeView diff --git a/src/TreeView/TreeView.tsx b/src/TreeView/TreeView.tsx index 87b398acd17..13d8f0ccaf4 100644 --- a/src/TreeView/TreeView.tsx +++ b/src/TreeView/TreeView.tsx @@ -224,7 +224,7 @@ const Item = React.forwardRef( '&:focus-visible > div': { boxShadow: (theme: Theme) => `inset 0 0 0 2px ${theme.colors.accent.emphasis}`, '@media (forced-colors: active)': { - outline: '2px solid SelectedItem', + outline: '2px solid HighlightText', outlineOffset: -2 } } @@ -272,7 +272,10 @@ const Item = React.forwardRef( height: '24px', content: '""', bg: 'accent.fg', - borderRadius: 2 + borderRadius: 2, + '@media (forced-colors: active)': { + backgroundColor: 'HighlightText' + } } } },