NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Form elements do not have associated labels

Open jeltehomminga opened this issue 2 years ago • 3 comments

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

  1. Go to 'login-signup-forms' on chrome
  2. RightClick on inspect
  3. Open lighthouse and click Analyze page load
  4. See error

CleanShot 2022-12-29 at 12 18 50

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

CleanShot 2022-12-29 at 12 22 58

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

jeltehomminga avatar Dec 29 '22 04:12 jeltehomminga

Hey @jeltehomminga , Thanks for reporting. We will look into this.

AshwiniKumar007 avatar Dec 29 '22 05:12 AshwiniKumar007

FYI also for Android the inputs are not accessible because labels are not associated the inputs

jeltehomminga avatar Jan 15 '23 13:01 jeltehomminga

Hi, does anyone have any updates on this one please?

kahlan88 avatar Apr 25 '24 15:04 kahlan88