Skip to content

Commit d704c92

Browse files
tyler-daneCopilot
andauthored
fix(web): add id and name attributes to input fields for accessibility (#1144)
* feat(web): add id and name attributes to input fields for accessibility * Update packages/web/src/views/Today/components/Task/Task.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/web/src/views/Onboarding/steps/events/SomedaySandbox/SomedaySandbox.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/web/src/views/Onboarding/steps/events/SomedaySandbox/SomedaySandbox.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7bc107d commit d704c92

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

packages/web/src/views/Login/Login.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ export const LoginView = () => {
144144
</InfoText>
145145
<EmailFormContainer onSubmit={handleCheckWaitlistSubmit}>
146146
<EmailInputField
147+
id="email-input"
148+
name="email"
147149
type="email"
148150
placeholder="Enter your email"
149151
value={emailInput}

packages/web/src/views/Onboarding/steps/events/SomedaySandbox/SomedaySandbox.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export const SomedaySandbox: React.FC<OnboardingStepProps> = ({
7373
{weekTasks.length < WEEK_LIMIT && (
7474
<TaskInput
7575
autoFocus
76+
id="week-task-input"
77+
name="week-task-input"
7678
type="text"
7779
placeholder="Create new task..."
7880
value={newWeekTask}
@@ -99,6 +101,8 @@ export const SomedaySandbox: React.FC<OnboardingStepProps> = ({
99101
{monthTasks.length < MONTH_LIMIT && (
100102
<TaskInput
101103
ref={monthInputRef}
104+
id="month-task-input"
105+
name="month-task-input"
102106
type="text"
103107
placeholder="Create new task..."
104108
value={newMonthTask}

packages/web/src/views/Today/components/AddTask/AddTaskActiveButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export function AddTaskActiveButton({
3131
<div className="flex-1">
3232
<input
3333
ref={addTaskInputRef}
34+
id="add-task-input"
35+
name="new-task-title"
3436
type="text"
3537
value={newTaskTitle}
3638
onChange={(e) => setNewTaskTitle(e.target.value)}

packages/web/src/views/Today/components/Task/Task.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export const Task = ({
6565
tabIndex={-1}
6666
aria-label={`Edit ${task.title}`}
6767
data-task-id={task.id}
68+
id={`task-input-${task.id}`}
69+
name={`task-title-${task.id}`}
6870
className={`text-white-100 w-full bg-transparent text-sm outline-none ${
6971
isEditing
7072
? "border-b border-white/20"

0 commit comments

Comments
 (0)