Skip to content

Commit

Permalink
Update ListItem.jsx
Browse files Browse the repository at this point in the history
add name and id attribute to input element for semantics and accessibility
  • Loading branch information
StefieCaff committed Feb 27, 2024
1 parent b5c18cb commit c2cf196
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/ListItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function ListItem({ name, listPath, id, dateLastPurchased }) {
{name}
<input
type="checkbox"
id={`checkbox-${id}`} // Unique identifier
name={name}
onChange={handleChecked}
checked={subtractDates(todaysDate, dateLastPurchased)}
Expand Down

0 comments on commit c2cf196

Please sign in to comment.