-
Notifications
You must be signed in to change notification settings - Fork 437
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
Edit Item, Bitstreams tab: Accessibility improvements #3464
base: main
Are you sure you want to change the base?
Conversation
For most screen sizes, the ResponsiveTableSizes is enough to resize the table columns. On very small screens, or when zoomed in a lot, even the smallest column sizes are too big. To make it possible to view the rest of the content even in these situations, the ability to scroll horizontally is added.
…ms-table-main # Conflicts: # src/app/item-page/edit-item-page/edit-item-page.module.ts # src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.spec.ts # src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts # src/app/shared/notifications/models/notification-options.model.ts # src/app/shared/notifications/notifications-board/notifications-board.component.spec.ts # src/app/shared/notifications/notifications-board/notifications-board.component.ts # src/app/shared/pagination-drag-and-drop/abstract-paginated-drag-and-drop-list.component.spec.ts # src/app/shared/pagination-drag-and-drop/abstract-paginated-drag-and-drop-list.component.ts
An easy way to do that is to go to the add a bitstream to an existing item as an admin, then find that POST request to the Afterwards it is a good idea to at least rename some of the bitstreams, so you can see the effect of a reorder |
We have tested the main and the dspace 8.x version of this PR:
Result:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AAwouters : I tested and reviewed this today. It works great! I verified that it fixes all the accessibility bugs mentioned in the description, and verified that I can now move bitstreams using only the keyboard.
That said, I found a single console.log
which needs to be removed before we merge this. Once you delete it, I will officially approve this and merge it.
src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.service.ts
Outdated
Show resolved
Hide resolved
430f716
to
cc70eaa
Compare
References
Fixes
Backports
Description
This PR refactors the Edit Item, Bitstreams tab so that the content appears in a
<table>
element. Visually, very little has changed. Structurally, the component works completely different.Every bundle now has its own
<table>
element with each bitstream in a different<tr>
. The table, columns and bitstream name cells now have id's which are referenced byheaders
tags in the other table cells to aid accessibility tools.The bitstream rows' drag handles are now always visible. Previously they were partially hidden which made them harder to tab-target. In addition to being draggable, a row can now be selected by clicking the drag handle, or pressing space/enter when the handle is in focus. Once a row is in focus it can be moved around using the arrow keys. All performed actions are announced in the live region.
This PR also makes a small change to the
notifications-board
component: The content of all notifications that are shown in the board is also announced in the live region.Instructions for Reviewers
Moving bitstreams with the keyboard is slow
Depending on the backend you use, you might notice that the moving the bitstreams around with the keyboard might take some time. The reason for this is that every move is immediately sent to the backend, so the UI has to wait for the backend to respond with the new order of the bitstreams in the bundle before it can show the current order.
I considered creating a 'preview' of the order and only sending the request when the user confirms the new position, but creating a correct preview when the user moves around in the different pages or changes the page size is difficult. (Unless all bitstreams of all bundles are retrieved immediately, but then there is almost no reason to keep using the pagination.)
Checklist
yarn lint
yarn check-circ-deps
)package.json
), then their software licenses must align with the DSpace BSD License based on the Licensing of Contributions documentation.