NativeBase
NativeBase copied to clipboard
Form elements do not have associated labels
Description
I expect the labels are linked to input fields so the inputs are accessible
CodeSandbox/Snack link
https://docs.nativebase.io/login-signup-forms
Steps to reproduce
- Go to 'login-signup-forms' on chrome
- RightClick on inspect
- Open lighthouse and click Analyze page load
- See error
If I inspect the Dom elements I can see the elements are not linked because of mismatched between the label for attribute value and input id attribute value
the input id value has "-input" appended to it, while the label for field has not. I hope this can be fixed. I'm new to using nativebase and really love it so far, only a bit disappointed by the low accessibility score I am getting ion the browser because of this issue.
Thanks for the great work!
NativeBase Version
3.4.25
Platform
- [ ] Android
- [ ] CRA
- [X] Expo
- [ ] iOS
- [X] Next
Other Platform
No response
Additional Information
It also seems for inputs that have a helper text the input is labelled by the helper text, which doesn't seem entirely correct. I guess it's better to label the input by the label itself
Hey @jeltehomminga , Thanks for reporting. We will look into this.
FYI also for Android the inputs are not accessible because labels are not associated the inputs
Hi, does anyone have any updates on this one please?