react-code-input
react-code-input copied to clipboard
Incorrect autofocus attribute
Hi,
It seems to me that autoFocus prop sets incorrect state.
Indeed, here you set autoFocus="autofocus" if autofocus prop is set, autofocus="" otherwise.
However, in HTML 5, the presence of the attribute acts as a boolean, then both autoFocus="autofocus" and autoFocus="" has the same signification (see this Stack Overflow question).
On another hand, as specified in the MDN, autofocus is not a good practice for accessibility, then maybe it would be a better choice to set this attribute default to false ?