We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d418f1b commit bbdd403Copy full SHA for bbdd403
src/scripts/Popover.tsx
@@ -4,6 +4,7 @@ import React, {
4
FC,
5
ReactNode,
6
forwardRef,
7
+ useId,
8
useEffect,
9
} from 'react';
10
import classnames from 'classnames';
@@ -117,15 +118,19 @@ export const PopoverInner = forwardRef<
117
118
: undefined
119
: undefined,
120
};
121
+ const bodyId = useId();
122
return (
123
<section
124
ref={ref}
125
className={popoverClassNames}
126
role={tooltip ? 'tooltip' : 'dialog'}
127
style={rootStyle}
128
+ aria-describedby={bodyId}
129
{...rprops}
130
>
- <PopoverBody style={bodyStyle}>{children}</PopoverBody>
131
+ <PopoverBody id={bodyId} style={bodyStyle}>
132
+ {children}
133
+ </PopoverBody>
134
</section>
135
);
136
});
0 commit comments