How to make a Textarea 508 compliance

I have a textarea which shows as an input text in html. 508 check complains it missing an associated label. how can I add a lable to this field or are there any other work arounds to pass 508 check? Below is the error and the suggestion I got from achecker.

Check 57: input element, type of “text”, missing an associated label.

Repair: Add a label element that surrounds the control’s label. Set the for attribute on the label element to the same value as the id attribute of the control. And/or add a title attribute to the input element. And/or create a label element that contains the input element.

As far as I understand it, the aria-labelledby should be enough for compatibility as far as the 508 is concerned, at least according to
this page
, but it sounds like whatever checker you are using maybe doesn’t support that feature. The div surrounding the input serves the function of the associated label in this case.

Thanks Anna. Can I change the aria-labelledby? Currently it gives aria-labelledby=“gwt-uid-3”, I would like to change the name.

I’ve never tried, but those names are generated by GWT, so I’d imagine it would be quite challenging. I’m just about to leave the office for the day, though, so no time to check. Sorry.

Correction: client-side, not necessarily GWT part of it. Haven’t been involved with that part so not sure which.