I'm a big fan of keyboard shortcuts for the Windows, Resharper, Firefox, Web Browsing, GMail, etc. The less I touch the mouse the more productive I am. One thing that can make a great web application suck hard is poor or absent tab indexing on form fields. It takes a little extra time on the developers part but it makes a world of difference to the end user. Rather than hard code tabIndexes, I use the following technique using a simple accumulator:
<?brail
tabIndex = 1
?>
${Form.FormTag({'action':'login'})}
<table>
<tr>
<td>${Form.LabelFor('username', 'Username')}</td>
<td>
${Form.TextField('username', {'tabIndex':tabIndex++})}
</td>
</tr>
<tr>
<td>${Form.LabelFor('password', 'Password')}</td>
<td>${Form.PasswordField('password', {'tabIndex':tabIndex++})}</td>
</tr>
<tr>
<td />
<td>${Form.Submit('Login', {'tabIndex':tabIndex++})}</td>
</tr>
</table>
${Form.EndFormTag()}
One problem I struggled with in ASP.Net was allowing tabIndexes to properly flow from a page to a user control then back again. I'm going to ping Oren to see if it is possible to declare tabIndex 'globally' (in a layout maybe?) and allow all views/sub views/view components to use the same value to try and address this in MonoRail.
posted @ Tuesday, June 26, 2007 11:13 PM