Fix structure nav for multi-sectioned IA manifests - #876
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: #818
Following changes are made in this PR to improve structured navigation for Canvas ranges without mediafragment information. The IA Manifest in question has multiple canvases and are referenced in the
structuresproperty with the relevant Canvas ids. However, these ids don't have mediafragment information attached as expected by Ramp, e.g.url#t=0,2.0.While working on this, I came across that if such ranges referencing to sections has children the collapsible UI is not operable by using left/right arrow keys to collapse/expand the sections as expected. This breaks accessibility for such structure displays. So, this PR has an additional fix to that as well.
Changes in the PR:
idwith mediafragment in the parser, so that click handlers have required information to provide desired functionality (Related Manifest: https://iiif.archive.org/iiif/3/Weirdos_demo-1978/manifest.json)sectionRefwhen building structured navigation to use freshrefs for each section, which fixes automatic scrolling to the last section every time the page loads or a Canvas is changed. Observe this behavior for the IA Manifest at https://ramp.avalonmediasystem.org/?iiif-content=https://iiif.archive.org/iiif/3/Weirdos_demo-1978/manifest.json.Tabkey to navigate to the structureArrowDownkey to move focus inside the structureArrowDownuntil focus is on Atto Primo structure itemArrowLeft-> nothing happens (this should ideally collapse the section), pressArrowRight-> nothing happens (this should ideally move the focus to the first structure child under this section)