Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement e2e accessibility tests for pages in DSpace User Interface #3213

Merged
merged 12 commits into from
Oct 9, 2024

Conversation

FrancescoMolinaro
Copy link
Contributor

@FrancescoMolinaro FrancescoMolinaro commented Jul 23, 2024

References

Fixes #2780

Description

Implemented automated accessibility tests for pages in User Interface and for pages accessible also to anonymous users which missed tests.

Instructions for Reviewers

To check accessibility tests there is an automated pipeline here on GitHub, otherwise every single page can be checked with the browser extension axe DevTools.

https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • 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.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • 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.

@FrancescoMolinaro FrancescoMolinaro removed their assignment Jul 23, 2024
@tdonohue tdonohue added bug accessibility 1 APPROVAL pull request only requires a single approval to merge funded Task is funded via the DSpace Development Fund and removed funded Task is funded via the DSpace Development Fund labels Jul 23, 2024
@tdonohue tdonohue self-requested a review July 23, 2024 15:50
@tdonohue tdonohue added port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Jul 23, 2024
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FrancescoMolinaro : Apologies for the delay in reviewing this. This looks great! I've run the tests locally to be sure they work, and almost all of them work perfectly. However, I'm seeing minor accessibility failures from processes-overview.cy.ts and admin-notifications-publication-claim.cy.ts... But, it's possible it's my local test data causing issues.

Could you perhaps rebase this on the latest main in order to trigger the e2e tests to run again? If a fresh run is successful, we can merge this immediately. Thanks again.

@tdonohue tdonohue added this to the 9.0 milestone Oct 8, 2024
@alanorth alanorth changed the title Implement e2e accessibility tests for pages in DSpace User Inteface Implement e2e accessibility tests for pages in DSpace User Interface Oct 9, 2024
Metadata Import
Batch Import
Processes Overview
New Process
Quality Assurance Sources
Edit Eperson
Edit Group
Create EPerson
Epeople Registry
Groups Registry
Admin Notifications Publication Claim
Admin Search Page
Bulk Access
Create Group
Metadata Registry
Admin Curation Task
Bitstream Format
Health Page
Metadata Schema
Admin Add New Modals
Admin Edit Modals
Admin Export Modals
Admin Workflow Page
End User Agreement
Feedback
Profile Page
System Wide Alert
@FrancescoMolinaro
Copy link
Contributor Author

Hi @tdonohue , no worries at all and thanks for checking.
I have rebased the branch with main and noticed there were still a couple of issue:

  1. item-edit would often go in timeout, I have added an interceptor to mitigate this issue and at least locally I can't reproduce the timeout anymore.

  2. edit-group would sometime throw an accessibility error, landmark-unique, because of the multiple pagination components in the page. I have added an aria-label composed by a brief descriptive text and the ID of the pagination options, in this way each and every component should have now a unique descriptive text (role + aria-label).

A part from these two fixes I haven't experienced issues with processes-overview or admin-notifications-publication-claim and also on the latest run I can see they are passing successfully, it could actually depends on your local data.

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @FrancescoMolinaro ! This looks great now. I'm going to merge immediately, and see if we can backport it (minimally to 8.x). A backport to 7.x might need to be done manually (because not all the features tested in this PR existed in 7.x), but would also be worthwhile

@tdonohue tdonohue merged commit 7611635 into DSpace:main Oct 9, 2024
13 checks passed
@dspace-bot
Copy link
Contributor

Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3213-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3213-to-dspace-7_x
git switch --create backport-3213-to-dspace-7_x
git cherry-pick -x e6a7fb852a147e9193fd3164660d12228c36d56a a0e3c41be6d7fbf93dc98ce2973831ab3b222b68 85e486438a1aab91856ecd218cdd497a081b4003 d12d0faf0904e241008c1e8c1f9463e19daf3b91 4cd55d6669ca5c7e61d7b7e924602dfa477391ae 69f618e8566445b800b83bcc4604bd2e59a98b28 2369b27178890b44d79e52ad7d4d02d3dcfff89b f131ae2f6babf03170f3ee719285456cbfa22392 0e5b924f4266e8c83f2b03e0a8de9347cd45d3b5 55ab43f132864e22396e369184f6c3c8a98e4a53 2b466bb382553907d743a2cdbed2df3f90782814 9e985cf2d448d3a720a7ae208f14b7e7475dd7df

@dspace-bot
Copy link
Contributor

Successfully created backport PR for dspace-8_x:

@tdonohue
Copy link
Member

tdonohue commented Oct 9, 2024

@FrancescoMolinaro : Could you see if this is possible to port to dspace-7_x? As I expected, the port for that failed. I think it is likely because some of the features/changes tested here only exist in 8.x. So, I'm hopeful that a dspace-7_x version of this PR should be smaller.

@tdonohue tdonohue added testing framework Related specifically to Unit or Integration (e2e) Tests and removed port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Oct 9, 2024
@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Oct 10, 2024
@tdonohue
Copy link
Member

Ported to 7.x in #3405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge accessibility bug testing framework Related specifically to Unit or Integration (e2e) Tests
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

All pages in the DSpace User Interface should have automated accessibility tests
3 participants