Streaming live at 10am (PST)

Any way to add the "for" attribute to labels?


#1

Hi, trying to add a for label to a simple form - the label is directly above the field it should be tied to.

I’ve tried removing and adding the label again, per the advice here For attribute of a label, but it’s not working.

I must say that after a couple of years of this being an issue it’s still not been added.

This is critical for sites adhering to accessibility specifications - and right now there is now way for a Webflow hosted site to pass this.

Is there any known way to tie a label to a field via the for attribute?

Thanks.


Here is my site Read-Only: LINK


#2

For the record, here are the other reserved custom attribute names:

[List] Feature Availability & Limits

You provided a share link but did not mention which page and section this is on? Also, we cannot see the published version of this site. Could you re-create this on a temporary project instead?


#3

Sergie mentioned that

So you could try putting both label and field inside the same div, so that they can be “tied” together using the above-mentioned.


Form Label and For Attribute
#5

Hi @evanmcd thank you so much for sharing this!

We’re looking into this internally as I was just testing and it looks like the automated for field wasn’t showing up in form labels on my end. We have an issue filed internally and I’ll let you know as soon as I have a status on this bug fix.

The current workaround would be to use a custom code embed to add your labels with a for attribute attacked if you’re up against some sort of deadline.

Something like this in an embed should do the trick:

<label for"name" class="enter-class-name">Name</label>

I’ll follow up as soon as I have more information! :bowing_man:


For attribute is not working as expected
#6

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.