File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
components/dashboard/src/components Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,11 @@ export default function Modal(props: {
73
73
}
74
74
75
75
return (
76
- < div className = "fixed top-0 left-0 bg-black bg-opacity-70 z-50 w-screen h-screen" >
76
+ < div
77
+ className = "fixed top-0 left-0 bg-black bg-opacity-70 z-50 w-screen h-screen"
78
+ aria-labelledby = "modal-title"
79
+ role = "alertdialog"
80
+ >
77
81
< div className = "w-screen h-screen align-middle" style = { { display : "table-cell" } } >
78
82
< div
79
83
className = { cn (
@@ -84,6 +88,7 @@ export default function Modal(props: {
84
88
{ props . closeable !== false && (
85
89
< button
86
90
className = "absolute right-7 top-6 cursor-pointer text-gray-800 bg-transparent dark:text-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-md p-2"
91
+ aria-label = "Close this modal"
87
92
onKeyDown = { ( e ) => {
88
93
// Prevent the modal from submitting when attempting to close it
89
94
if ( e . key === "Enter" || e . key === "Space" ) {
@@ -119,7 +124,11 @@ type ModalHeaderProps = {
119
124
} ;
120
125
121
126
export const ModalHeader = ( { children } : ModalHeaderProps ) => {
122
- return < h3 className = "pb-2" > { children } </ h3 > ;
127
+ return (
128
+ < h3 className = "pb-2" id = "modal-title" >
129
+ { children }
130
+ </ h3 >
131
+ ) ;
123
132
} ;
124
133
125
134
type ModalBodyProps = {
You can’t perform that action at this time.
0 commit comments