Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility improvement for <textarea> form control element #304

Open
sara-akhtar opened this issue Mar 9, 2023 · 2 comments
Open

Accessibility improvement for <textarea> form control element #304

sara-akhtar opened this issue Mar 9, 2023 · 2 comments

Comments

@sara-akhtar
Copy link

sara-akhtar commented Mar 9, 2023

There's an issue that's impacting multiple components in our application. The <textarea> element has no associated label which doesn't allow the browser to announce the control to a user that may need it.

Recommendations on fixes:

  • If the control is a labelable element, add a for attribute to a visible label with the id of this control (e.g. );
  • Or, if the control is a labelable element, put the control inside a visible element;
  • Or, add an aria-labelledby attribute to the control. It must point to visible text on the page that is meaningful as a label;
  • Or, if the design cannot have a visible label, provide a label using the aria-label attribute (e.g. aria-label="Activities");
  • Or, if the design cannot have a visible label, use the title attribute to provide a label.

Screenshot 2023-03-09 at 2 00 44 PM

Screenshot 2023-03-09 at 2 04 24 PM

@sara-akhtar sara-akhtar changed the title Accessibility improvement for <textarea> form Accessibility improvement for <textarea> form control element Mar 9, 2023
@sara-akhtar
Copy link
Author

@scniro any updates on this bug?

@alestrunda
Copy link

By default, there is no label, but you can set it in the options as screenReaderLabel - will set it as aria-label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants