Use label in Toggle example
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```js
.map(toggled =>
div([
input({attrs: {type: 'checkbox', id: 'aaa'}}), 'Toggle me',
p(toggled ? 'ON' : 'off')
])
)
```
Should be
```
.map(toggled =>
div([
input({attrs: {type: 'checkbox', id: 'aaa'}}),
label({htmlFor: 'aaa'}, 'Toggle me'),
p(toggled ? 'ON' : 'off')
])
)
```
However, `htmlFor` isn't picked up for label. Re: https://github.com/snabbdom/snabbdom/issues/206
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Toggle example shown in the issue and inspect how its label attributes are rendered. Compare the htmlFor behavior with the linked snabbdom issue. Done means the example uses a label for the checkbox and htmlFor correctly associates it with the input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100