Monday, January 30, 2012

sabotage the ability to tab to a control with tabindex="-1"

If you are doing something hacky and you need an "invisible" HTML input that is:

  1. not a hidden input type
  2. not hidden by a style of display: none;

You can always move the control off the page's edge with a style of margin-left:-9999px;

...but, yes, the control is accessible by way of tabbing unless you take steps to sabotage the ability to tab to the control with: tabindex="-1"

No comments:

Post a Comment