If remember_me_form_alter() the username, password, remember me and form actions are given tabindex attributes with a value of 1.

I'm not sure why this was ever really needed, as the checkbox gets put in the right place in the form anyway so it's all navigable quite happily via keyboard?

Anyway, unless there's a really good reason why this is required, I'd say it shouldn't be in the module. Messing around with the natural tabbing order of the page is generally considered bad practice unless you really know what you're doing and have a very controlled environment. It's quite an invasive behavioural change.

In our case, we've got other form elements on that form itself which don't also get tabindex added, which makes for a really unpredictable tabbing behaviour. I'll not explain but it essentially makes the other form elements inaccessible (not strictly speaking, but it really messes up the UX for keyboard users).

Patch to follow!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stevetweeddale’s picture

Status: Active » Needs review
FileSize
1.18 KB

After just removing the lines about tabindex I was left with a rather empty/odd looking logical structure so actually rewrote it a little bit to avoid looping over the array and hopefully make it a little easier to read.

karma123’s picture

Version: 7.x-1.0 » 7.x-1.1
Status: Needs review » Patch (to be ported)
james.williams’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Patch (to be ported) » Needs work
Issue tags: +Needs reroll

The patch does not apply to the latest dev or stable versions, it needs re-rolling.

karma123’s picture

Version: 7.x-1.x-dev » 7.x-1.1
Status: Needs work » Needs review
FileSize
1.17 KB

Reroll to version 7.1.1

karma123’s picture

FileSize
1.17 KB
james.williams’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Issue tags: -Needs reroll

Thanks!