PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Why is tabindex set on each field?

  1. I understand what tabindex is for, what I'm wondering is why does Gravity Forms set it for each field?

    If it's left off, the fields will just have their natural tab order based on their position in the document.

    The reason I ask is there is a fairly recent patch to WordPress core: http://core.trac.wordpress.org/ticket/21471 that adds a "skip to toolbar" accessibility link whenever the Admin Toolbar is displayed. This link has a tabindex of 1, and must have that for accessibility reasons. Whenever the toolbar is visible, and with a default embed of a Gravity Form, it causes tabbing from the first form field to go to the "skip to" link first before continuing on with the rest of the form.

    Normally this isn't an issue as the vast majority of users inputting forms probably won't have the toolbar visible, but I'm sure there are plenty of sites using Gravity Forms that have logged-in users with the Toolbar visible.

    I know that for each form I can just manually up the tabindex in the shortcode to something greater than 1, and can even add a filter that sets all forms default tabindex to something higher:

    add_filter("gform_tabindex", create_function("", "return 75;"));

    That requires adding code though, which is something I'm sure many of your customers aren't willing to do.

    Would it be possible to add an option that toggles whether or not tabindex is output for each field? Or even setting the default tabindex to something higher than 1? Since this change is in WP core, and won't be changed, this could cause issues going forward. Thanks.

    Posted 11 years ago on Monday April 15, 2013 | Permalink
  2. Thanks for the suggestion. We'll consider the idea as we move forward.

    Posted 11 years ago on Tuesday April 16, 2013 | Permalink
  3. Thanks Kevin.

    Posted 11 years ago on Tuesday April 16, 2013 | Permalink