react-code-input
react-code-input copied to clipboard
Fields have no labels
Hi!
As per Deque University's accessibility rules, all inputs must have some form of label to pass basic a11y testing. See here: https://dequeuniversity.com/rules/axe/3.5/label?application=axeAPI
I'm working on a project that has quite stringent accessibility rules, and while react-code-input is working perfectly, it fails on this count.
I'd propose adding an optional label
prop, which would add an aria-label
attribute to each input, with the index appended.
Let me know if I can submit a PR for that, or any thoughts on this topic! Thanks :)
While they apply such a change, you can resolve it by wrapping the input with a
<label style={{ ...yourStyles, color: transparent }}> Label text <ReactCodeInput {...props} /> </label>