mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
VizTooltip: Improve edge positioning and a11y (#83584)
This commit is contained in:
parent
b89de96681
commit
9190fb28e8
@ -509,7 +509,13 @@ export const TooltipPlugin2 = ({
|
||||
|
||||
if (plot && isHovering) {
|
||||
return createPortal(
|
||||
<div className={cx(styles.tooltipWrapper, isPinned && styles.pinned)} style={style} ref={domRef}>
|
||||
<div
|
||||
className={cx(styles.tooltipWrapper, isPinned && styles.pinned)}
|
||||
style={style}
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
ref={domRef}
|
||||
>
|
||||
{isPinned && <CloseButton onClick={dismiss} />}
|
||||
{contents}
|
||||
</div>,
|
||||
@ -527,7 +533,7 @@ const getStyles = (theme: GrafanaTheme2, maxWidth?: number, maxHeight?: number)
|
||||
zIndex: theme.zIndex.tooltip,
|
||||
whiteSpace: 'pre',
|
||||
borderRadius: theme.shape.radius.default,
|
||||
position: 'absolute',
|
||||
position: 'fixed',
|
||||
background: theme.colors.background.primary,
|
||||
border: `1px solid ${theme.colors.border.weak}`,
|
||||
boxShadow: theme.shadows.z2,
|
||||
|
Loading…
Reference in New Issue
Block a user