Skip to content

Commit

Permalink
ARIA label modal as dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinWoo committed Nov 7, 2023
1 parent 0bd29ea commit 741150f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"typescript": "^4.8.4"
},
"scripts": {
"start": "react-scripts start",
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts build",
"tsc": "../node_modules/.bin/tsc --noEmit false",
"lint": "eslint . --ext .js --ext .jsx --ext .ts --ext .tsx --fix",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Modal/ConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const ConfirmationModal = ({
};

return (
<Modal title={''} isOpen={open} onClose={closeModal} displayClose={true}>
<Modal title={''} isOpen={open} onClose={closeModal} displayClose={true} id="confirm-modal">
<div className={styles.modal}>
<p className={styles.modalText}>
Are you sure you want to remove {user.firstName} {user.lastName}?
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ const Modal = ({
}}
>
<div className={styles.background}>
<div className={styles.modal}>
<div
className={styles.modal}
role="dialog"
aria-modal="true"
aria-labelledby={id}
>
<div className={styles.topContainer}>
{isRider ? (
<h1 className={styles.title} id={id}>
Expand Down

0 comments on commit 741150f

Please sign in to comment.