<input id=\"firstNameField\" type=\"text\"\/><\/code><\/p>\nCorrectly Implementing Labels in Your Forms<\/h2>\n For some, merely discussing the issues in the previous section could be enough to correct them. For everyone still here, this section is where I will dive into how to properly label an online form.<\/p>\n
Keep Labels Visible and Consistently Placed<\/h3>\n Easy. Don’t hide labels and keep them in the same place. It really is that simple. The label can go above, below, or to the left side of the field; there are plenty of options to design around.<\/p>\n
Do Not Use the Placeholder Attribute as a Label<\/h3>\n As I mentioned in the common problems section, the placeholder attribute of a field is not a replacement for a label. Placeholders disappear when a field is changed and generally have lower visibility.<\/p>\n
Avoid Floating Labels<\/h3>\n I also do not recommend using floating labels. This is a design pattern where the label of the field is present, but lays over the input until the user clicks or focuses into it. The label then moves out of the way—or worse—fades out. Often, this little touch of flair causes the label’s text to shrink, and the user may not properly track the animation or change in visual state. This introduces possible points of friction and really isn’t worth the perceived oomph.<\/p>\n
Avoid Generic Labeling<\/h3>\n Before I go into detail about repeated labels I would like to touch on generic ones. The label attached to a field should clearly communicate the information needed to successfully complete the form. A field that requires a user’s full name is a good example of how a strong descriptive label can convey the request.<\/p>\n
A generic label in a form will not get flagged as a WCAG failure, it is not a requirement but… I consider generic labels to be an accessibility concern because unclear communication can make access to content and services difficult. Lack of clarity creates friction, and friction repels users.<\/p>\n
To provide an example of a generic label let’s examine a field that expects a user to supply their full name that is only labeled “name.” Name what? Name is generic and leaves a lot of room for interpretation. More context should be supplied to narrow down possibilities and instruct the user to complete the field successfully.<\/p>\n
A better label would be “Full Name.” This can be taken further considering the purpose of the information; “Legal Name,” “Your Name,“ “First and Last Name,” or “Preferred Name” are better, more descriptive examples of a label that requests a name from a user.<\/p>\n
I have an anecdote about generic field labeling to share. It revolves around a form that collected information for a home moving quote. An important field on the form collected the expected date of the move and was labeled, simply, “Move Date.” This crucial field was causing users to bounce from the form before submitting it.<\/p>\n
The solution to the problem you ask? Changing the label to “Estimated Moving Date.” One small change to the label increased the completions of the form. The added context of the word “estimated” conveyed to the user that they can ask for a quote without being 100% certain of their moving date.<\/p>\n
Avoid Repeating Labels<\/h3>\n Something worth noting is that because a label references the ID of a field, one field could have multiple labels that reference it but a single label can only reference one field. In most cases that shouldn’t be a problem, but this is the internet which means one size doesn’t fit all.<\/p>\n
For example, imagine a form that asks the user to list four favorite foods. It would be redundant to have four fields that each have a generic label of “favorite food,” or even more specific labels of “favorite food 1,” “favorite food 2,” and so on. If your form allowed the user to add infinite favorite foods, this would get ridiculous.<\/p>\n
Should you find yourself in a place where you need one label to apply to multiple fields, there is a way to do that using the “aria-labelledby” attribute.<\/p>\n
Using Aria-labelledby for Multiple Fields With the Same Label<\/h4>\n If you are unfamiliar with ARIA I want to quickly touch on two things. First, it stands for Accessible Rich Internet Applications and is an additional set of markup in HTML specifically for assistive technology. Second, is a warning that ARIA has to be used correctly or it can really mess up the experience for an assistive technology user. If you don’t need to use it, then it’s best you don’t.<\/p>\n
But now back to my example. You gotta have those “favorite food” labels! aria-labelledby is placed on the input element, and references the ID of the label that applies to the field. aria-labelledby can also tie multiple labels to a single field by putting a space between each ID.<\/p>\n
Here is an example of aria-labelledby being applied to four text fields that all use the same label:<\/p>\n
<label id=\"favFoodLabel\">Favorite Foods<\/label><\/code><\/p>\n<input type=\"text\" aria-labelledby=\"favFoodLabel\"\/><\/code><\/p>\n<input type=\"text\" aria-labelledby=\"favFoodLabel\"\/><\/code><\/p>\n<input type=\"text\" aria-labelledby=\"favFoodLabel\"\/><\/code><\/p>\n<input type=\"text\" aria-labelledby=\"favFoodLabel\"\/><\/code><\/p>\nThat’s It!<\/h2>\n Ensuring labels are present and properly linked to fields, keeping them visible, and making sure they are clear and descriptive are some easy steps to creating good forms that allow the most amount of people to interact with them. And while I understand that Minimalism is a tempting (and popular) design philosophy, the forms you put out in the world can be aesthetically pleasing, but that goal should be secondary to functionality. You, the person reading this, likely fill out forms all the time. Search your experiences and think of how many times you needed a form to be useful and respect your time rather than fun to look at.<\/p>\n
We also put a really nice form on this page that properly instructs you to supply your email address in return for blog updates. You should try it, for educational purposes… of course.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"
When was the last time you enjoyed filling out a form? No, seriously, like really enjoyed it? I mean kicked in your roommate’s bedroom door to show them a video of a gaze of chunky adorable raccoons tearing at a grown man holding a storage container full of hotdogs kinda fun. Never? Not surprising. Because, […]<\/p>\n","protected":false},"author":137,"featured_media":54744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[639],"coauthors":[],"class_list":["post-54734","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-design-dev","tag-accessibility"],"acf":[],"yoast_head":"\n
How to Properly Label Online Form Fields - Portent<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n","yoast_head_json":{"title":"How to Properly Label Online Form Fields - Portent","description":"Forms are a big topic where accessibility, user experience, and CRO are concerned. Follow these best practices to correctly implement form labels.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm","og_locale":"en_US","og_type":"article","og_title":"How to Properly Label Online Form Fields - Portent","og_description":"Forms are a big topic where accessibility, user experience, and CRO are concerned. Follow these best practices to correctly implement form labels.","og_url":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm","og_site_name":"Portent","article_publisher":"https:\/\/www.facebook.com\/portent.marketing","article_published_time":"2020-12-03T15:00:27+00:00","article_modified_time":"2024-09-05T15:00:10+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels.png","type":"image\/png"}],"author":"Jeremiah Bratton","twitter_card":"summary_large_image","twitter_creator":"@portent","twitter_site":"@portent","twitter_misc":{"Written by":"Jeremiah Bratton","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#article","isPartOf":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm"},"author":{"name":"Jeremiah Bratton","@id":"https:\/\/www.eigene-homepage-erstellen.net\/#\/schema\/person\/47d40cbff97de7f36ad33e8b9a63b68f"},"headline":"Form Follows Function: How to Properly Label Online Form Fields","datePublished":"2020-12-03T15:00:27+00:00","dateModified":"2024-09-05T15:00:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm"},"wordCount":1593,"commentCount":0,"publisher":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/#organization"},"image":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#primaryimage"},"thumbnailUrl":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels.png","keywords":["accessibility"],"articleSection":["Design & Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm","url":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm","name":"How to Properly Label Online Form Fields - Portent","isPartOf":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#primaryimage"},"image":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#primaryimage"},"thumbnailUrl":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels.png","datePublished":"2020-12-03T15:00:27+00:00","dateModified":"2024-09-05T15:00:10+00:00","description":"Forms are a big topic where accessibility, user experience, and CRO are concerned. Follow these best practices to correctly implement form labels.","breadcrumb":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#primaryimage","url":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels.png","contentUrl":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels.png","width":1200,"height":628,"caption":"\"\""},{"@type":"BreadcrumbList","@id":"https:\/\/www.eigene-homepage-erstellen.net\/blog\/design-dev\/form-follows-function-how-to-properly-label-online-form-fields.htm#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eigene-homepage-erstellen.net\/"},{"@type":"ListItem","position":2,"name":"Form Follows Function: How to Properly Label Online Form Fields"}]},{"@type":"WebSite","@id":"https:\/\/www.eigene-homepage-erstellen.net\/#website","url":"https:\/\/www.eigene-homepage-erstellen.net\/","name":"Portent","description":"Digital Marketing Agency - Seattle, WA","publisher":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.eigene-homepage-erstellen.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.eigene-homepage-erstellen.net\/#organization","name":"Portent","url":"https:\/\/www.eigene-homepage-erstellen.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.eigene-homepage-erstellen.net\/#\/schema\/logo\/image\/","url":"https:\/\/portent.wpenginepowered.com\/images\/2018\/08\/logo-indigo.svg","contentUrl":"https:\/\/portent.wpenginepowered.com\/images\/2018\/08\/logo-indigo.svg","width":182,"height":40,"caption":"Portent"},"image":{"@id":"https:\/\/www.eigene-homepage-erstellen.net\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/portent.marketing","https:\/\/x.com\/portent","https:\/\/www.linkedin.com\/company\/portent\/"]},{"@type":"Person","@id":"https:\/\/www.eigene-homepage-erstellen.net\/#\/schema\/person\/47d40cbff97de7f36ad33e8b9a63b68f","name":"Jeremiah Bratton","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.eigene-homepage-erstellen.net\/#\/schema\/person\/image\/c2bcc28da7afa6c885c680f62bde382c","url":"https:\/\/secure.gravatar.com\/avatar\/b929a6a824576640a7a015f1b3cbfcde?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b929a6a824576640a7a015f1b3cbfcde?s=96&d=mm&r=g","caption":"Jeremiah Bratton"},"description":"Jeremiah has more than 20 years of experience combining the art of design with the art of web development. As Portent's development team lead, he works closely with the entire development team to bridge the gap between creative aesthetic and technical implementation, building functional and efficient sites that meet client needs while delivering a positive user experience. Jeremiah takes a user-focused approach to web development, and is passionate about making the web accessible to as many people as possible.","sameAs":["https:\/\/www.linkedin.com\/in\/jeremiahbratton"],"url":"https:\/\/eigene-homepage-erstellen.net\/blog\/author\/jbratton"}]}},"author_meta":{"display_name":"Jeremiah Bratton","author_link":"https:\/\/eigene-homepage-erstellen.net\/blog\/author\/jbratton"},"featured_img":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels-300x157.png","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2020\/12\/Featured-Image_FOrm-Field-Labels.png","tax_additional":{"categories":{"linked":["Design & Dev<\/a>"],"unlinked":["Design & Dev<\/span>"]},"tags":{"linked":["accessibility<\/a>"],"unlinked":["accessibility<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 4 years ago","modified":"Updated 2 months ago"},"absolute_dates":{"created":"Posted on December 3, 2020","modified":"Updated on September 5, 2024"},"absolute_dates_time":{"created":"Posted on December 3, 2020 7:00 am","modified":"Updated on September 5, 2024 8:00 am"},"featured_img_caption":"","series_order":"","category_info":[{"taxonomy":"category","name":"Design & Dev","slug":"design-dev","permalink":"https:\/\/eigene-homepage-erstellen.net\/blog\/design-dev","icon":"https:\/\/eigene-homepage-erstellen.net\/wp-content\/uploads\/2021\/08\/Dev-category-icon.png","theme":"creative"}],"author_info":{"first":"Jeremiah","last":"Bratton","url":"https:\/\/eigene-homepage-erstellen.net\/blog\/author\/jbratton"},"_links":{"self":[{"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/posts\/54734"}],"collection":[{"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/users\/137"}],"replies":[{"embeddable":true,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/comments?post=54734"}],"version-history":[{"count":0,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/posts\/54734\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/media\/54744"}],"wp:attachment":[{"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/media?parent=54734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/categories?post=54734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/tags?post=54734"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/eigene-homepage-erstellen.net\/wp-json\/wp\/v2\/coauthors?post=54734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}