I was told to raise this issue after posting this issue against Field group module (see #1357896: Focus jumps to horizontal tab when pressing enter on a form element).
The issue is that on pressing enter on a form element (e.g. an box) that is inside a horizontal tab, focus jumps to the tab title. I realise this may improve accessibility slightly, but it stops other things happening that should - for example, autocomplete boxes are unusable and the form can't be submitted that way.
My suggested solution for Field group module was simply to avoid moving focus if enter was pressed on an <input> element (they already implemented this for <textarea> elements anyway), but if core is leading the way on this, then it sounds like a discussion should be had here.
Comment | File | Size | Author |
---|---|---|---|
#15 | drupal-1361218-15.patch | 717 bytes | Kevin Morse |
#7 | 1361218.patch | 737 bytes | Owen Barton |
#5 | 1361218.patch | 717 bytes | Owen Barton |
Comments
Comment #1
Everett Zufelt CreditAttribution: Everett Zufelt commentedSee #1357896: Focus jumps to horizontal tab when pressing enter on a form element
I don't recall the reasoning behind adding this to vertical tabs, the issue is at #467296-93: Accessibility improvements for vertical tabs , I recommend starting at comment #93.
Comment #2
JacineI'd also like to see this adressed. I ran into this issue the other day creating a jQuery plugin to make form descriptions into tooltips.
My issue is with an
<a>
element. I couldn't unbind the current behavior, so wasn't able to get the script working properly using keyboard for navigation, which is kinda sad... Accessibility "improvements" are blocking me from writing an accessible script.I hope there is a better way to handle this.
Comment #3
Owen Barton CreditAttribution: Owen Barton commentedThis totally bit me on Drupal 7 the other day, using the "chosen" module (fancy multi-select boxes), with field_group module.
Comment #4
Everett Zufelt CreditAttribution: Everett Zufelt commentedFrom the 2011-12-13 a11y call, it was decided by consensus that we can likely remove this functionality, provided that the patch is properly tested by AT and keyboard only users.
Speaking as a screen-reader user who interacts with Drupal all day long, I have never used the functionality.
Comment #5
Owen Barton CreditAttribution: Owen Barton commentedHere is a patch that implements #4. In my tests pressing enter when focus is on a form element (other than a form element that traps the enter key) now submits the form, which I think is expected/normal behavior. Autocomplete dropdowns and textareas trapped returns as they should, without submitting the form.
Comment #7
Owen Barton CreditAttribution: Owen Barton commentedComment #8
Owen Barton CreditAttribution: Owen Barton commentedComment #9
Bojhan CreditAttribution: Bojhan commentedworks here, RTBC?
Comment #10
nod_Tested and works here too :)
Comment #11
Everett Zufelt CreditAttribution: Everett Zufelt commented+1 on RTBC. I'd like to see this backported to D7 after being committed to D8.
Comment #12
Bojhan CreditAttribution: Bojhan commentedbackport tag
Comment #13
mgifford#7: 1361218.patch queued for re-testing.
Comment #14
catchCommitted/pushed to 8.x, thanks! Moving to 7.x for backport. Barely needs a re-roll so tagging novice for that.
Comment #15
Kevin Morse CreditAttribution: Kevin Morse commentedThis should do it!
Comment #16
oriol_e9gSame for D7!
Comment #17
webchickInteresting. This code originally came in via #467296: Accessibility improvements for vertical tabs . I guess we made it a little too accessible. :D
Committed and pushed to 7.x. Tagging as something to mention in the 7.13 release notes.
Comment #18.0
(not verified) CreditAttribution: commentedFixed issue link