Skip to main Content
Back to posts

Form fields

Posted 11mnths ago
profile pic

Philo Front end 2 Comments

What are some best practices that follow WCAG accessibility guidelines on the form fields to prevent errors and assist users in filling out the form correctly?

0 up votes 0 down votes

Comments

  • profile pic
    mailtoloco

    Hello,

    I will add some more recommandations.

    1. to assign the role alert to the box in which appear error message. It will force those message to be said by screen readers when they will appear.

    2. If the form is the main attraction of the current page, to automatically bring the focus to its first field when the page is loaded. Generally it is done by assigning the attribute autofocus to that first field. E.G: identification form, registration forms, etc.

    3. to not forget to indicate mandatory fields by:

    • Assigning to those fields the attribute "required";

    • putting a star "*" at the beginning of the text of the label associated to those fields.

    0 up votes 0 Down votes
  • profile pic
    Felix _K

    To follow WCAG accessibility guidelines on form fields and prevent errors while assisting users in filling out the form correctly, the following best practices should be considered: 1. Provide Clear Instructions: Include overall instructions that apply to the entire form before the <form> element to ensure they are read aloud by screen readers before switching to "Forms Mode." Additionally, provide in-line instructions within the labels of the form to assist users in filling out the fields correctly 2. Support Keyboard Navigation: Ensure that the form can be easily navigated using a keyboard, as people with impaired vision or motor function rely on keyboards to navigate online forms. The tab key should allow users to jump between links and form controls 3. Use Clear Visual Labels: Every form field should have a corresponding label, and if a label must be hidden, use a method for visually hiding content that keeps the label accessible to screen readers 4. Provide Error Messages: In case of any errors in the form, provide clear and descriptive error messages to assist users in correcting their input 5. Avoid Horizontal Layout Forms: Unless necessary, it is recommended to avoid horizontal layout forms, as they can be challenging for some users to navigate.

    0 up votes 0 Down votes

Unleash Your Voice, Amplify Accessibility

Empower Your Voice, Share Your Topics on Accessibility, and Ignite a Change in web content

Create a post