Skip to content

Commit 67571b9

Browse files
(Modal): add necessary attributes
1 parent 8672c49 commit 67571b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/scripts/Modal.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const ModalHeader: FC<ModalHeaderProps> = (props) => {
5050
const hdClassNames = classnames(className, 'slds-modal__header');
5151
return (
5252
<div className={hdClassNames} {...rprops}>
53-
<Text tag='h2' category='heading' type='medium'>
53+
<Text tag='h2' category='heading' type='medium' tabIndex={-1}>
5454
{title}
5555
</Text>
5656
{tagline ? <p className='slds-m-top_x-small'>{tagline}</p> : null}
@@ -160,13 +160,15 @@ const Modal_: FC<ModalProps> = (props) => {
160160
className={modalClassNames}
161161
aria-hidden={!opened}
162162
role='dialog'
163+
tabIndex={-1}
164+
aria-modal='true'
163165
{...rprops}
164166
>
165167
<div className='slds-modal__container' style={containerStyle}>
166168
{children}
167169
</div>
168170
</div>
169-
<div className={backdropClassNames} />
171+
<div className={backdropClassNames} role='presentation' />
170172
</ModalHandlersContext.Provider>
171173
);
172174
};

0 commit comments

Comments
 (0)