浏览代码

add aria modal true and role dialog to modal

Sine Jespersen 5 月之前
父节点
当前提交
bd2021e8e1
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/lib/components/common/Modal.svelte

+ 2 - 0
src/lib/components/common/Modal.svelte

@@ -67,6 +67,8 @@
 	<div
 	<div
 		bind:this={modalElement}
 		bind:this={modalElement}
 		use:focusTrap
 		use:focusTrap
+		aria-modal="true"
+		role="dialog"
 		class="modal fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full h-screen max-h-[100dvh] {containerClassName} flex justify-center z-9999 overflow-y-auto overscroll-contain"
 		class="modal fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full h-screen max-h-[100dvh] {containerClassName} flex justify-center z-9999 overflow-y-auto overscroll-contain"
 		in:fade={{ duration: 10 }}
 		in:fade={{ duration: 10 }}
 		on:mousedown={() => {
 		on:mousedown={() => {