Problem/Motivation
from the list of available source type tabs only the active one is included in the tab index on admin/modules/browse. All the other available source types tabs are not reachable by the keyboard that way. (see tabindex.mp4)
Steps to reproduce
if you first get on admin/modules/browse the drupal.org json:api tab is active. try to reach the recipes tab just with the keyboard without using the mouse.
Proposed resolution
include all enabled source type tabs into the tabindex and drop the onKey function in the tabs.svelte file so the navigation between tabs is only tab based and not arrow key based.
| Comment | File | Size | Author |
|---|---|---|---|
| tabindex.mp4 | 122.66 KB | rkoller |
Issue fork project_browser-3479907
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rkollerand i just noticed in tabs.svelte starting in line 12 the onKeydown function the user is able to instead of moving between the focus states with the arrow keys instead of the tab button. in addition to the point added in the proposed resolution adding all visible tabs to the tab index i would also remove the keyboard navigation by the arrow key since it is breaking with the usage pattern used in other parts of the admin UI that also has secondary tabs (for example on
admin/structure/types/manage/article/display)Comment #3
sourav_paulComment #5
sourav_paulI don't feel droping onKeydown() is better approach as after doping the function, can't switch project browser tabs using arrow keys Or tab.
Comment #6
utkarsh_33 commentedThis explains the reason why we need to drop onKeydown().
Also the GitlabCI is not passing so marking it NW again.
Comment #7
utkarsh_33 commentedEven though the CI might fail but everything under the scope of the issue is done.So marking it NR for any feedbacks on the changes or any suggestions.
Comment #8
rkollerthanks for the update @utkarsh_33. i've manually tested and the secondary tabs are all included in the tabindex now while it is not possible to navigate those secondary tabs by the left and right arrow key. so from a functional perspective this looks good to go. the tests are also green. i would say this issue is RTBC and let chris or who is reviewing the issue in the end decide if filterByCategory() should be dealt within this issue or a followup. but a followup seems the better pick as you've already suggested in one of the comments on gitlab.
Comment #11
chrisfromredfinThanks for the report!