File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import React, {
44 FC ,
55 ReactNode ,
66 forwardRef ,
7+ useId ,
78 useEffect ,
89} from 'react' ;
910import classnames from 'classnames' ;
@@ -70,13 +71,13 @@ export type PopoverProps = {
7071 bodyStyle ?: CSSProperties ;
7172 offsetX ?: number ;
7273 offsetY ?: number ;
73- } & HTMLAttributes < HTMLDivElement > ;
74+ } & HTMLAttributes < HTMLElement > ;
7475
7576/**
7677 *
7778 */
7879export const PopoverInner = forwardRef <
79- HTMLDivElement ,
80+ HTMLElement ,
8081 PopoverProps & AutoAlignInjectedProps
8182> ( ( props , ref ) => {
8283 const {
@@ -117,16 +118,20 @@ export const PopoverInner = forwardRef<
117118 : undefined
118119 : undefined ,
119120 } ;
121+ const bodyId = useId ( ) ;
120122 return (
121- < div
123+ < section
122124 ref = { ref }
123125 className = { popoverClassNames }
124126 role = { tooltip ? 'tooltip' : 'dialog' }
125127 style = { rootStyle }
128+ aria-describedby = { bodyId }
126129 { ...rprops }
127130 >
128- < PopoverBody style = { bodyStyle } > { children } </ PopoverBody >
129- </ div >
131+ < PopoverBody id = { bodyId } style = { bodyStyle } >
132+ { children }
133+ </ PopoverBody >
134+ </ section >
130135 ) ;
131136} ) ;
132137
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const paddingDecorator: DecoratorFn = (story) => (
2020 padding : '100px 350px' ,
2121 } }
2222 >
23- < div className = 'slds-dropdown-trigger' >
23+ < div className = 'slds-dropdown-trigger slds-dropdown-trigger_click ' >
2424 < Button type = 'icon' icon = 'question' />
2525 { story ( ) }
2626 </ div >
You can’t perform that action at this time.
0 commit comments