diff --git a/docs/docs/options.mdx b/docs/docs/options.mdx index 5ac3918c..3dd7bc80 100644 --- a/docs/docs/options.mdx +++ b/docs/docs/options.mdx @@ -130,4 +130,4 @@ import { Tooltip } from 'react-tooltip'; | `opacity` | CSS opacity | no | `0.9` | a CSS opacity value | Change the opacity of the tooltip | | `arrowColor` | CSS color | no | | a CSS background color | Change color of the tooltip arrow | | `disableStyleInjection` | `boolean` or `'core'` | no | `false` | `true` `false` `'core'` | Whether to disable automatic style injection. Do not set dynamically. Check the [styling page](./examples/styling#disabling-reacttooltip-css) for more details | -| `role` | `'tooltip'` or `'dialog'` | no | `tooltip` | `'tooltip'` `'dialog'` | Set ARIA role, either `tooltip` or `dialog` if the tooltip should contain focusable elements | +| `role` | React.AriaRole | no | `tooltip` | `'tooltip'` `'dialog'` | Set ARIA role, either `tooltip` or `dialog` if the tooltip should contain focusable elements | diff --git a/src/components/Tooltip/TooltipTypes.d.ts b/src/components/Tooltip/TooltipTypes.d.ts index f7e63dc6..d5158cbb 100644 --- a/src/components/Tooltip/TooltipTypes.d.ts +++ b/src/components/Tooltip/TooltipTypes.d.ts @@ -153,5 +153,5 @@ export interface ITooltip { border?: CSSProperties['border'] opacity?: CSSProperties['opacity'] arrowColor?: CSSProperties['backgroundColor'] - role?: 'tooltip' | 'dialog' + role?: React.AriaRole } diff --git a/src/components/TooltipController/TooltipControllerTypes.d.ts b/src/components/TooltipController/TooltipControllerTypes.d.ts index 8519cd2f..b97e9c07 100644 --- a/src/components/TooltipController/TooltipControllerTypes.d.ts +++ b/src/components/TooltipController/TooltipControllerTypes.d.ts @@ -93,7 +93,7 @@ export interface ITooltipController { setIsOpen?: (value: boolean) => void afterShow?: () => void afterHide?: () => void - role?: 'tooltip' | 'dialog' + role?: React.AriaRole } declare module 'react' {