Eslint-plugin-jsx-a11y: form onSubmit trips jsx-a11y/no-noninteractive-element-interactions rule

Created on 12 Sep 2017  路  1Comment  路  Source: jsx-eslint/eslint-plugin-jsx-a11y

eg.

<form onSubmit={this.handleSubmit.bind(this)} method="POST">
    <button type="submit">
        Save
    </button>
</form>

This rule makes sense for a div or span etc., but not in the above case.

Most helpful comment

Indeed, forms should be able to have onSubmit (the issue that .bind in the render path is super slow would be handled by eslint-plugin-react :-) )

>All comments

Indeed, forms should be able to have onSubmit (the issue that .bind in the render path is super slow would be handled by eslint-plugin-react :-) )

Was this page helpful?
0 / 5 - 0 ratings