Repository navigation
[dtq-dev-93] Fix file preview focus and community tree levels - #1758
Open
milanmajchrak wants to merge 4 commits into
Open
milanmajchrak wants to merge 4 commits into
milanmajchrak wants to merge 4 commits into
Conversation
The close control is hidden with the preview panel, so focus fell to the page body. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An empty value now clears its floated label, as Bootstrap 3 dl-horizontal did. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tree now keys rows by id, so kept rows no longer report aria-level 1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The port of the dtq-dev item page fixes shows N/A for an empty description, so the value is never empty and the MD5 row stays in place. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
References
No dtq-dev source for the focus fix. The MD5 row for a file without a description is fixed by FE 1749 (port of the dtq-dev item page fixes), which shows N/A for an empty description. The community tree bug is new in DSpace 9 and is not fixed upstream yet (DSpace/dspace-angular
mainhas the same tree code).Description
Two small accessibility fixes: focus returns to Preview after the file preview closes, and the community tree reports the right levels to screen readers.
Instructions for Reviewers
List of changes in this PR:
FileDescriptionComponent: the close control of the preview panel calls a newclosePreview(). It collapses the panel and focuses the Preview control. Before, the close control was hidden with the panel and focus fell to the page body.CommunityListComponent:<cdk-tree>getsexpansionKey, the node id, liketrackBy. The tree builds new node objects on every reload, but a kept row holds its first one. CDK 20 looks uparia-level,aria-posinsetandaria-setsizeby that key, so kept rows read level 1 after a community expanded or after "Show more".How to test:
/community-list. Expand one community, then another. In DevTools the children of the first one still havearia-level="2". Click "Show more" under a community with many collections: the kept collections still havearia-level="2".npm run test -- --include=src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.spec.ts --include=src/app/community-list-page/community-list/community-list.component.spec.tsCodex review (gpt-6.2-sol, high): 1 finding, not changed. It is about duplicate collections when two pages of the tree overlap. The base already keys tree rows by id through
trackBy, so this PR does not change that case.Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.🤖 Generated with Claude Code