react-mailchimp-form
react-mailchimp-form copied to clipboard
[Google Lighthouse] Form elements do not have associated labels.
ref.: https://web.dev/label/?utm_source=lighthouse&utm_medium=devtools
Suggestion
- Add "id" into , so that it supports <label HtmlFor=""> separately for font-end element.
Example:
// landing_page.tsx
...
<label className="subscribe-title" htmlFor="EMAIL">
{signuptitle}
</label>
...
// react-mailchimp-form/src/index.js
...
{fields.map(input =>
<input
{...input}
key={input.name}
id={input.name}
onChange={({ target }) => this.setState({ [input.name]: target.value })}
defaultValue={this.state[input.name]}
/>
)}
...
Also looking for this.