Skip to content

Make 'id's unique in PaginationComponent#2836

Draft
mwoodiupui wants to merge 3 commits intoDSpace:mainfrom
mwoodiupui:multiple-pagination
Draft

Make 'id's unique in PaginationComponent#2836
mwoodiupui wants to merge 3 commits intoDSpace:mainfrom
mwoodiupui:multiple-pagination

Conversation

@mwoodiupui
Copy link
Member

@mwoodiupui mwoodiupui commented Feb 26, 2024

Description

When displaying a Community with both child Collections and sub-Communities, the pagination controls for the two lists will have duplicate id attributes. SiteImprove considers this an accessibility issue. This patch generates a UUID member in PaginationComponent and uses it in the template to make the ids unique.

Instructions for Reviewers

To test, you will need a Community with child Collections and sub-Communities, so that both lists appear.

List of changes in this PR:

  • The component's class exposes a public elementId field, which is initialized to a UUID in the constructor.
  • The template appends this to id attributes as appropriate.
  • The .spec is updated to provide UUIDService for injection.

NOTE: the .spec is broken: "NullInjectorError: No provider for UUIDService!"
NOTE: after the above is fixed, the .spec will probably fail because it is looking for fixed attribute values. I will work on that after the suite is repaired enough to run at all.

Checklist

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@github-actions
Copy link

github-actions bot commented Mar 8, 2024

Hi @mwoodiupui,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@github-actions
Copy link

Hi @mwoodiupui,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@github-actions
Copy link

Hi @mwoodiupui,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@mwoodiupui mwoodiupui added the help wanted Needs a volunteer to claim to move forward label Apr 23, 2024
@mwoodiupui
Copy link
Member Author

"Help wanted" because I need some advice on how to make the specs work.

@github-actions
Copy link

Hi @mwoodiupui,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

This pull request has been automatically marked as stale because it has not had
activity in one year. It will be closed in 14 days if no further activity occurs.

Allowing pull requests to close as stale helps us filter out old work that is no longer
relevant and helps developers focus on reviewing current work.

All pull requests closed by this bot act like normal pull requests;
they can be searched for, commented on or reopened at any point.

If these changes are still relevant then please comment and/or rebase your PR based on the
latest DSpace code. This will remove the stale status and notify us to assign a reviewer
for your PR.

@github-actions github-actions bot added the stale This issue or PR is stale because it has not been updated in a long time. label Feb 1, 2026
@mwoodiupui mwoodiupui removed the stale This issue or PR is stale because it has not been updated in a long time. label Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility bug help wanted Needs a volunteer to claim to move forward

Projects

Status: 👀 Under Review

Development

Successfully merging this pull request may close these issues.

1 participant