Skip to content

Commit

Permalink
Accessibility: hidden fields now use HTML hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunanoordin committed Jun 24, 2024
1 parent 7376979 commit d8a1927
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,13 @@ function DrawingTask({
}
</button>
</div>
{showHelpField && (
<textarea
id={`task-${taskKey}-help`}
value={help}
onBlur={update}
onChange={(e) => { setHelp(e?.target?.value) }}
/>
)}
<textarea
id={`task-${taskKey}-help`}
hidden={!showHelpField}
value={help}
onBlur={update}
onChange={(e) => { setHelp(e?.target?.value) }}
/>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,13 @@ function QuestionTask({
}
</button>
</div>
{showHelpField && (
<textarea
id={`task-${taskKey}-help`}
value={help}
onBlur={update}
onChange={(e) => { setHelp(e?.target?.value) }}
/>
)}
<textarea
id={`task-${taskKey}-help`}
hidden={!showHelpField}
value={help}
onBlur={update}
onChange={(e) => { setHelp(e?.target?.value) }}
/>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,13 @@ function TextTask({
}
</button>
</div>
{showHelpField && (
<textarea
id={`task-${taskKey}-help`}
value={help}
onBlur={update}
onChange={(e) => { setHelp(e?.target?.value) }}
/>
)}
<textarea
id={`task-${taskKey}-help`}
hidden={!showHelpField}
value={help}
onBlur={update}
onChange={(e) => { setHelp(e?.target?.value) }}
/>
</div>
</div>
);
Expand Down

0 comments on commit d8a1927

Please sign in to comment.