Ticket #2845 (closed Feature Requests: fixed)

Opened 5 years ago

Last modified 5 years ago

Use tabindex in all forms

Reported by: mbrevda Assigned to: p_lindheimer
Priority: minor Milestone: 2.5
Component: Core Version: 2.4-branch
Keywords: Cc:
Confirmation: Need testing Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description (Last modified by mbrevda)

Using taborder in html, it is much easier to navigate the page as text is never selected when you hit tab - just form stuff. Here's an example:

<form>
    Field 1 (first tab selection):
    <input type="text" name="field1" tabindex=1 /><br />
    Field 2 (third tab selection):
    <input type="text" name="field2" tabindex=3 /><br />
    Field 3 (second tab selection):
    <input type="text" name="field3" tabindex=2 /><br />
  </form> 

Probably the best way to number the tabs is with a variable, i.e.

<input type="text" name="field3" tabindex="<?php $tabindex++; ?>" /><br />

would it make cents to create a function to generate all form item on a page?

Attachments

svn-2.5.patch (2.8 kB) - added by mbrevda on 07/03/08 20:41:57.
tabindex.diff (12.1 kB) - added by mbrevda on 07/09/08 17:22:47.

Change History

06/15/08 10:50:10 changed by mbrevda

  • description changed.

07/03/08 20:31:46 changed by mbrevda

  • confirmation changed from Unreviewed to Need testing.
  • summary changed from Use taborder in all forms to Use tabindex in all forms.

I have attached a patch for the phone book and ivr modules (against 2.5). Please test, and let me know if this could work for other modules. Basically all you need to do is to insert

 tabindex="<?php echo ++$tabindex;?>"

in to every tab-able object that you want to be in order. Its a very dynamic solution as you don't need to actualy number the fields.

07/03/08 20:41:57 changed by mbrevda

  • attachment svn-2.5.patch added.

07/04/08 14:16:41 changed by p_lindheimer

  • milestone changed from Cut Line to 2.5.

see comments in r5903

07/04/08 16:29:58 changed by p_lindheimer

Moshe, having a reasonable tab order is way better than the current state. This would be fine if you want to go through the various modules. Beware of old style hooks though. You will want to find those (in the functions.inc.php files) and for those you probably want to do so it like:

<?php echo isset($tabindex) ? ' tabindex="'.$tabindex++.'"' : ''; ?>

so if the hook ends up inserting in a module that has not been instrumented it won't throw un-necessary warnings.

07/05/08 21:58:22 changed by mbrevda

r5919 add tabindex to all items except those called via drawlistmenu or drawselect or other hooks. also missed page.routing.php

07/06/08 04:20:17 changed by p_lindheimer

r5921 - drawselects destination boxes

07/06/08 05:01:06 changed by mbrevda

hmm, im not sure that r5921 is doing what it should be. Also, it would probably be best to tabindex just the first radio button in the list as the directional arrows can be used to select the destination - and then you can hit tab to jump right to the Submit button.

07/06/08 05:12:20 changed by mbrevda

Status update: The following modules still need to be updated:

  1. devices
  2. users
  3. outbound routes
  4. time conditions

(the country indications in the general page seems to be missing as well)

07/09/08 17:22:47 changed by mbrevda

  • attachment tabindex.diff added.

07/09/08 17:35:03 changed by mbrevda

added a patch that fixes country indications. this 'might' work as well for pin sets. Waiting for feedback

07/10/08 12:23:52 changed by mbrevda

Assuming that the above patch is accepted, the following still needs to be updated

  1. Devices - submit button
  2. Users - submit button
  3. Feature codes - submit button
  4. Outbound routes - pinsets
  5. -trunk sequence
  6. Time Conditions - Associate with

07/11/08 11:50:44 changed by mbrevda

  • status changed from new to closed.
  • resolution set to fixed.

continued in #2903