mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Accessibility: Style now has focus state (#34422)
This commit is contained in:
parent
4cbffae1b4
commit
3f0df997bc
@ -7,6 +7,7 @@ import { Icon } from '../Icon/Icon';
|
|||||||
import { IconName } from '../../types';
|
import { IconName } from '../../types';
|
||||||
import { stylesFactory, useTheme2 } from '../../themes';
|
import { stylesFactory, useTheme2 } from '../../themes';
|
||||||
import { Counter } from './Counter';
|
import { Counter } from './Counter';
|
||||||
|
import { getFocusStyles } from '../../themes/mixins';
|
||||||
|
|
||||||
export interface TabProps extends HTMLProps<HTMLAnchorElement> {
|
export interface TabProps extends HTMLProps<HTMLAnchorElement> {
|
||||||
label: string;
|
label: string;
|
||||||
@ -62,15 +63,14 @@ const getTabStyles = stylesFactory((theme: GrafanaTheme2) => {
|
|||||||
link: css`
|
link: css`
|
||||||
color: ${theme.colors.text.secondary};
|
color: ${theme.colors.text.secondary};
|
||||||
padding: ${theme.spacing(1.5, 2, 1)};
|
padding: ${theme.spacing(1.5, 2, 1)};
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
svg {
|
svg {
|
||||||
margin-right: ${theme.spacing(1)};
|
margin-right: ${theme.spacing(1)};
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
&:focus-visible {
|
||||||
display: block;
|
+ ${getFocusStyles(theme)}
|
||||||
height: 100%;
|
|
||||||
color: ${theme.colors.text.secondary};
|
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
notActive: css`
|
notActive: css`
|
||||||
|
Loading…
Reference in New Issue
Block a user