react-mailchimp-form icon indicating copy to clipboard operation
react-mailchimp-form copied to clipboard

[Google Lighthouse] Form elements do not have associated labels.

Open Lhhim opened this issue 5 years ago • 1 comments

ref.: https://web.dev/label/?utm_source=lighthouse&utm_medium=devtools

Suggestion

  1. 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]}
          />
        )}
...

Lhhim avatar Feb 08 '20 07:02 Lhhim

Also looking for this.

sophieheb avatar Mar 17 '20 21:03 sophieheb