@moderneinc/design-system-components 7.7.0-next.1b7b25 → 7.7.0-next.3048d0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ export interface ModTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
39
39
  * - Typography: semanticTypography.tooltip (12px/1.5 line-height), fontWeight.semiBold (600) for the title
40
40
  */
41
41
  export declare const ModTooltip: {
42
- ({ variant, title, description, children, arrow, placement, ...props }: ModTooltipProps): import("react").JSX.Element;
42
+ ({ variant, title, description, children, arrow, placement, describeChild, ...props }: ModTooltipProps): import("react").JSX.Element;
43
43
  displayName: string;
44
44
  };
45
45
  export {};
package/dist/index.d.ts CHANGED
@@ -3131,7 +3131,7 @@ interface ModTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
3131
3131
  * - Typography: semanticTypography.tooltip (12px/1.5 line-height), fontWeight.semiBold (600) for the title
3132
3132
  */
3133
3133
  declare const ModTooltip: {
3134
- ({ variant, title, description, children, arrow, placement, ...props }: ModTooltipProps): react.JSX.Element;
3134
+ ({ variant, title, description, children, arrow, placement, describeChild, ...props }: ModTooltipProps): react.JSX.Element;
3135
3135
  displayName: string;
3136
3136
  };
3137
3137
 
package/dist/index.esm.js CHANGED
@@ -4872,8 +4872,10 @@ const ModTooltip = ({
4872
4872
  children,
4873
4873
  arrow = false,
4874
4874
  placement,
4875
+ describeChild,
4875
4876
  ...props
4876
4877
  }) => {
4878
+ const accessibleName = typeof title === "string" && !description && !describeChild ? title : void 0;
4877
4879
  const titleContent = description ? /* @__PURE__ */ jsxs(Stack, { sx: { gap: `${spacing.spacing_1_4}px` }, children: [
4878
4880
  /* @__PURE__ */ jsx(Typography, { variant: "inherit", sx: { fontWeight: typography.fontWeight.semiBold }, children: title }),
4879
4881
  /* @__PURE__ */ jsx(Typography, { variant: "inherit", children: description })
@@ -4885,6 +4887,8 @@ const ModTooltip = ({
4885
4887
  title: titleContent,
4886
4888
  arrow,
4887
4889
  placement,
4890
+ describeChild,
4891
+ "aria-label": accessibleName,
4888
4892
  ...props,
4889
4893
  children
4890
4894
  }