Skip to content

Commit cbeca27

Browse files
committed
feat(a11y): update to-do checkbox and delete button titles
1 parent c7a65bd commit cbeca27

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/TodoItem.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ defineProps<{ todo: TodoData; removeFn: (id: string) => void; toggleFn: (id: str
66

77
<template>
88
<div class="group flex items-center justify-between gap-5 rounded-lg p-2 text-xl animate-fade-up"
9-
:class="!todo.complete && 'bg-neutral-200/30'" :title="todo.name">
9+
:class="!todo.complete && 'bg-neutral-200/30'">
1010
<div class="flex w-full items-center gap-5 overflow-hidden">
11-
<input type="checkbox" :checked="todo.complete" @click="toggleFn(todo.id)"
11+
<input type="checkbox" title="Mark to-do as completed" :checked="todo.complete" @click="toggleFn(todo.id)"
1212
class="cursor-pointer rounded border border-neutral-700 bg-transparent p-3 text-vue-light focus:outline-none focus:ring-0" />
1313
<span :class="todo.complete && 'text-neutral-500 line-through'"
14-
class="overflow-hidden text-ellipsis whitespace-nowrap">{{ todo.name }}</span>
14+
class="overflow-hidden text-ellipsis whitespace-nowrap" :title="todo.name">{{ todo.name }}</span>
1515
</div>
16-
<button @click="removeFn(todo.id)" class="text-neutral-500/20 transition-colors hover:text-red-700">
16+
<button @click="removeFn(todo.id)" title="Delete to-do"
17+
class="text-neutral-500/20 transition-colors hover:text-red-700">
1718
<PhTrash weight="regular" />
1819
</button>
1920
</div>

0 commit comments

Comments
 (0)