Insights and Inspiration – The Hostnicker Blog

Adding Accessible Form Labels in Webflow

June 21, 2024

Start by logging into your Webflow account and opening the project where you want to add the form. If you don’t have a project yet, create a new one and add a new page for the form.

To begin, add a form block to your page. In the Webflow Designer, locate the Add Panel on the left side of the screen. Click on the plus icon to open the panel, then find the Forms section. Drag and drop the Form Block onto your canvas where you want the form to appear.

After setting up the form block, add the necessary form fields such as input boxes, text areas, or dropdowns. Head back to the Add Panel, select the appropriate field types, and drag them into your form block. Common fields include text fields for names and email addresses, along with text areas for messages.

For each form field, add a corresponding label. Click on the form field you want to label. In the settings panel on the right, scroll to find the Label option. If it's absent, manually add a text element above or next to the field.

Adhering to HTML standards, each label should be linked to its corresponding input field for accessibility. In Webflow, click on the label element you created. In the settings panel, find the options labeled 'For' or 'ID,' depending on the field type. Set this attribute to match the ID of the respective input field. For example, if your input field has the ID 'email,' set the label's 'For' to 'email.'

Once labels are added and associated, style them for clarity and enhanced user experience. Click on the label element and use the Style panel on the right to adjust font size, color, margin, and padding. Ensure labels are easy to read and clearly visible.

After setting everything up, it's crucial to test your form for accessibility. Use preview mode to check the form. When you focus on each input field, confirm that screen reader software reads the corresponding label aloud, assisting visually impaired users in understanding each field's purpose. Make any necessary adjustments if the screen reader doesn't read the labels correctly.

Once satisfied with your accessible form labels, publish your project. Click the publish button in the upper right corner of the Webflow Designer. After a brief wait, your changes will go live, allowing all users to interact with the form.