Tabindex Example

I'm sorry, that is not a properly formatted ZIP code. ZIP must be 5 or 9 digits. Please try again.

 

 


 

  1. Leaving text box (onblur) triggers ZIP code check.
  2. If check fails, reveal error message, set it's tabindex to -1, and set focus to it.
  3. Activating "try again" link sets focus to the text box.
  4. If check passes, hide error message (if visible).