Skip to content

Improve selected state and keyboard navigation in DSO selector#5876

Open
hernanhlagos wants to merge 1 commit into
DSpace:mainfrom
hernanhlagos:fix/5529-dso-selector-keyboard-navigation
Open

Improve selected state and keyboard navigation in DSO selector#5876
hernanhlagos wants to merge 1 commit into
DSpace:mainfrom
hernanhlagos:fix/5529-dso-selector-keyboard-navigation

Conversation

@hernanhlagos

Copy link
Copy Markdown

References

Description

This PR fixes the visual state of the selected collection in the selector, when moving an item from one collection to another, and also fixes keyboard navigation in Safari.

Instructions for Reviewers

List of changes in this PR:

  • Fixed the selected collection state by resolving the actual DSO id from listEntry.indexableObject.id instead of using listEntry['id'].
  • Replaced the previous conditional class logic with Bootstrap’s active state, so the selected collection is clearly marked.
  • Added helper methods to keep the selected-state logic out of the template.
  • Added tabindex="0" to the list entries to fix a Safari issue where focus skipped the collection list and moved directly from the search input to the final action buttons.
  • Used the @for $index to support keyboard navigation with ArrowDown and ArrowUp between collection entries in Safari.
  • Added unit tests for selected DSO detection and keyboard focus navigation.

How to test:

  1. Go to Admin Search.
  2. Select an item and choose Move Item.
  3. In the collection selector, select a collection.
  4. Verify that the selected collection is clearly marked.
  5. Select another collection and verify that the active state updates.
  6. In Safari, use Tab from the search input and verify that focus enters the collection list instead of skipping to the final action buttons.
  7. Use ArrowDown and ArrowUp to move through the collection entries.
  8. Use Enter or Space to select the focused collection.

Note: I was not able to reproduce the keyboard navigation issue in Chrome, but I was able to reproduce and validate the fix in Safari.

Checklist

@hernanhlagos hernanhlagos force-pushed the fix/5529-dso-selector-keyboard-navigation branch from 309902a to f44c56d Compare June 30, 2026 04:12
@lgeggleston lgeggleston added bug accessibility ux User Experience related works port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release port to dspace-10_x This PR needs to be ported to `dspace-10_x` branch for next bug-fix release labels Jun 30, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 11.0 Release Jun 30, 2026
@lgeggleston

Copy link
Copy Markdown

Thank you for putting up this pull request @hernanhlagos! You may have already seen, but this is currently failing a few build tests that will need to be fixed - looks like just minor linting errors though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility bug port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release port to dspace-10_x This PR needs to be ported to `dspace-10_x` branch for next bug-fix release ux User Experience related works

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

Active state indicator and keyboard navigation selecting a collection in Admin Search → Move Item

3 participants