Skip to content

Commit

Permalink
fix: now the error message in highlight form will alert assistive tech (
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline authored Oct 26, 2023
1 parent 967cd4f commit a0d4b3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/molecules/HighlightInput/highlight-input-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,13 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E
</DialogHeader>
<DialogCloseButton onClick={() => setIsDivFocused(false)} />
<form onSubmit={handlePostHighlight} className="flex flex-col gap-4 font-normal">
{errorMsg && (
<p className="inline-flex items-center gap-2 px-2 py-1 text-red-500 bg-red-100 border border-red-500 rounded-md w-full text-sm">
<MdError size={20} /> {errorMsg}
</p>
)}
<p role="alert">
{errorMsg && (
<span className="inline-flex items-center gap-2 px-2 py-1 text-red-500 bg-red-100 border border-red-500 rounded-md w-full text-sm">
<MdError size={20} /> {errorMsg}
</span>
)}
</p>
<div className="flex flex-col gap-2 p-2 overflow-hidden text-sm bg-white border rounded-lg">
<TypeWriterTextArea
className={`resize-y min-h-[80px] max-h-99 font-normal placeholder:text-slate-400 text-light-slate-12 placeholder:font-normal placeholder:text-sm transition focus:outline-none rounded-lg ${
Expand Down

0 comments on commit a0d4b3b

Please sign in to comment.