mirror of
https://github.com/bendtherules/demo-trello-app.git
synced 2026-08-18 13:42:40 +00:00
NewTaskList - Add a11y label
This commit is contained in:
@@ -11,8 +11,10 @@ export function NewTaskListPrompt() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.listContainer}>
|
<div className={styles.listContainer}>
|
||||||
|
<label className="sr-only" for="createNewList">Create new list</label>
|
||||||
<input
|
<input
|
||||||
className={styles.newListInput}
|
id="createNewList"
|
||||||
|
className={styles.newListInput}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="+ Create list"
|
placeholder="+ Create list"
|
||||||
value={newListname}
|
value={newListname}
|
||||||
|
|||||||
@@ -21,3 +21,16 @@ code {
|
|||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||||
monospace;
|
monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only show for screen readers */
|
||||||
|
.sr-only {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
padding: 0;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
white-space: nowrap; /* added line */
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user