Skip to content

Commit 82d4aaa

Browse files
committed
chore: add-aria-label-to-modal-dialog
1 parent 483b499 commit 82d4aaa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/container/modal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ interface ModalProps
1414
/** classname that applies to the modal overlay. */
1515
modalOverlayClassname?: ModalOverlayProps["className"];
1616
children?: DialogProps["children"];
17+
ariaLabel?: string;
1718
}
1819

1920
/** A modal is an overlay element which blocks interaction with elements outside it. */
2021
function Modal({
2122
className,
2223
modalOverlayClassname,
2324
children,
25+
ariaLabel,
2426
...props
2527
}: Readonly<ModalProps>) {
2628
return (
@@ -36,6 +38,7 @@ function Modal({
3638
>
3739
<AriaModal {...props}>
3840
<Dialog
41+
aria-label={ariaLabel ?? "Modal"}
3942
className={cn(
4043
"bg-klerosUIComponentsWhiteBackground h-[200px] w-[328px] outline-none",
4144
"rounded-base box-border",

0 commit comments

Comments
 (0)