Skip to content

Commit

Permalink
feat: aria-modal on dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
bvandercar-vt committed Jun 24, 2024
1 parent 97104bb commit 1a9709b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export interface DialogProps extends OverlayableProps, BackdropProps, Props {
/**
* @default "dialog"
*/
role?: Extract<React.AriaRole, 'dialog' | 'alertdialog'>;
role?: Extract<React.AriaRole, "dialog" | "alertdialog">;

/**
* CSS styles to apply to the dialog.
Expand Down Expand Up @@ -149,6 +149,7 @@ export class Dialog extends AbstractPureComponent<DialogProps> {
<div
className={classNames(Classes.DIALOG, className)}
role={role}
aria-modal={overlayProps.enforceFocus ?? Overlay2.defaultProps?.enforceFocus}
aria-labelledby={this.props["aria-labelledby"] || (title ? this.titleId : undefined)}
aria-describedby={this.props["aria-describedby"]}
style={style}
Expand Down

0 comments on commit 1a9709b

Please sign in to comment.