Skip to content

Commit d8f1843

Browse files
Add aria-modal attribute to Dialog (V2) element (#2851)
* Add `aria-modal` to `Dialog` (V2) * Create .changeset/giant-games-leave.md --------- Co-authored-by: Cole Bemis <[email protected]>
1 parent d03a7d8 commit d8f1843

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/giant-games-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
Add `aria-modal` attribute to `Dialog` (V2) element

src/Dialog/Dialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ const _Dialog = React.forwardRef<HTMLDivElement, React.PropsWithChildren<DialogP
302302
role={role}
303303
aria-labelledby={dialogLabelId}
304304
aria-describedby={dialogDescriptionId}
305+
aria-modal
305306
sx={sx}
306307
>
307308
{header}

0 commit comments

Comments
 (0)