Skip to content

Commit

Permalink
feat(tooltip): add default role for aria
Browse files Browse the repository at this point in the history
  • Loading branch information
p-sw committed Jul 18, 2024
1 parent bc2020f commit bef29eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react/components/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type AsChild, Slot, type VariantProps, vcn } from "@pswui-lib";
import React, { useState } from "react";
import React, { useState, useId } from "react";

interface TooltipContextBody {
position: "top" | "bottom" | "left" | "right";
Expand Down Expand Up @@ -140,6 +140,7 @@ const TooltipContent = React.forwardRef<HTMLDivElement, TooltipContentProps>(
...variantProps,
position: contextState.position,
})}
role="tooltip"
{...rest}
/>
);
Expand Down

0 comments on commit bef29eb

Please sign in to comment.