Active
Project:
Views vertical tabs style plugin
Version:
7.x-1.0
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Jul 2015 at 16:07 UTC
Updated:
30 Jan 2017 at 15:44 UTC
Jump to comment: Most recent
Comments
Comment #1
schiavone commentedComment #2
jibranThanks for creating the issue. I'm not an accessibility expert so I didn't totally understand the problem space here. In this module we are using core vertical_tabs element to render the output maybe we are missing something when we create render array.
Can you please add step by step instruction? In this case let suppose we have a page view of vertical tabs and from there give me keyboard instructions so that it helps me understand the problem.
Comment #3
schiavone commentedThe desired behavior on pressing the enter key is to give focus to the pane and select the first link there if one exists. Currently, focus is not given to links within the pane so keyboard navigation is not possible.
I've been digging in to understand what would be needed. I saw that core vertical_tabs is being extended that will make things easier. In core we have...
This doesn't happen in the module I think because...
#1 - we're looking for a field (the tabs in the edit node screen seem to always start with a field. After that you can navigate links using TAB and SHIFT-TAB)
Otherwise it looks like the pane object is using the same selector.
I'm still wrapping my head around how navigating tabs works. I'll take a look at what's in core to see if I can identify anything else.
Comment #4
schiavone commentedSuccessfully selected the first link within the pane by replacing...
$("fieldset.vertical-tabs-pane :input:visible:enabled:first").focus();with
$("fieldset.vertical-tabs-pane a:visible:first").focus();in core misc/vertical-tabs.js
So does this issue move into core or can the jQuery function in core be overridden by the module?
Comment #5
jibranYeah I think it's worth moving to core but for core it's a bug not a feature. If it doesn't get fixed in core issue queue then we can think about fixing it in views_vertical_tabs.
$("fieldset.vertical-tabs-pane a:visible:first").focus();doesn't this break for form api?Comment #6
schiavone commentedFrom what I can see the link selection is not needed in core so I'm trying to see if the core function and be extended in the module. Not expert in jQuery so it's taking me a bit of time. This way at the very least others can extend the function in in a custom module or in the theme or perhaps the this module can be patched to support navigating to the first link in the pane.
Comment #7
schiavone commentedThis snippet will move focus to the first link within the pane.
A function like this could be implemented in the module or the core function above could be extended to support giving focus to the first link if a field was unavailable. Continuing to tab should bring the user back to the active tab (needs work).
Comment #8
rooby commentedI would argue this still should be a Drupal core bug report.
Even though node forms and such have inputs to focus into, Drupal core is supposed to be providing generic functionality that works correctly if you use it for your own purpose. If that is not the case then that is a bug in Drupal core.
It could be overridden in this module as you suggest though if Drupal core maintainers would not consider changing the core functionality.
Comment #9
mgiffordRaising this as a separate issue in Core is a good way of raising awareness of this issue. Fixing things in Core is slow though, so I wouldn't close this here.