Form labels lack for

I’ve deployed the sample “contact us” form. It seems that the generated HTML has labels but they appear not to have a “for” attribute to link the label to a form field. This is a negative for accessibility. Is there any way to make the form generate “for” attributes, short of writing the HTML?

That’s no good at all! I looked into this and it seems the template in the forms plugin does set this to the id property/attribute for the field, but this is not set in the example contact form you mention.

Try adding the id property to the field’s frontmatter.

So the example is simple, but not the best it could be. Please consider making or requesting a change to the documentation, as it’s community maintained. Good find, thanks! :slight_smile: