-
Notifications
You must be signed in to change notification settings - Fork 438
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
Header, navbar, and admin sidebar refactoring #2676
Conversation
8866fdf
to
ecb19a9
Compare
Hi @davide-negretti, |
33011e8
to
b68903f
Compare
@davide-negretti : It looks like this PR now has merge conflicts, possibly because of the merger of #2683 (which also fixed some accessibility issues in the header). If you can get this updated, I'd love to give this PR a test to see if it fixes the duplicate tags in DOM & improves accessibility even further. Thanks! |
b68903f
to
7a1a2fd
Compare
@tdonohue I just pushed my branch, which I already rebased onto main a couple of hours ago. Unfortunately I had to discharge most of the conflicting changes because they did not apply anymore. The only changes I could have kept were some |
7a1a2fd
to
e2e332c
Compare
@davide-negretti : Even though this is still a "Draft", I gave this a very brief test just now in production mode ( However, when I login, I receive a number of server-side rendering (SSR) errors which imply that SSR isn't working anymore:
|
a239d98
to
1f9b183
Compare
9df0a50
to
54af1e4
Compare
|
# Conflicts: # src/assets/i18n/en.json5 # src/styles/_custom_variables.scss # src/themes/dspace/styles/_theme_css_variable_overrides.scss
|
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.
Thanks @davide-negretti!
One more minor comment. Perhaps due to the switch from li's to divs, the spacing between options in the mobile menu seems to have decreased. It is especially noticeable, because the user menu above still uses li's
@davide-negretti: I think it would be best to remove the changes you made regarding to the |
@alexandrevryghem I already added to every menu the I carefully tested the header with a screen reader, which previously recognised the menus as generic lists with N items, and now correctly recognises them as navigation bars. I also inspected the page with ARIA DevTools chrome extension. This is the current situation on demo.dspace.org: And this is with the correct roles: |
@artlowel I restored the spacing between items |
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.
Thanks @davide-negretti!
Hi @davide-negretti, |
# Conflicts: # src/assets/i18n/en.json5 # src/themes/dspace/app/navbar/navbar.component.html
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.
👍 Thanks @davide-negretti for your hard work on this! I retested today after merging the last 8.0 features that touch the header/navbar. This is still working perfectly and accessibility issues mentioned all appear fixed. Merging this immediately. (Please note: I am going to attempt an automated port to 7.x...though based on the size of this PR, it may not succeed.)
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-2676-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-2676-to-dspace-7_x
git switch --create backport-2676-to-dspace-7_x
git cherry-pick -x 640612033c7a296d56a3e3d7497fa99492947011 e84773afb25b20a9689a614f20361f7e8b086fc9 d59f33278dd5c1d76cadce614d3e125e9b5e0568 216558125bfdd12fda3a6104315b07ef2f1cd75b b8ec74a04624e1c351235ffa2f40bfbc8c2fe55c 8f73b8ff9d6ec426f51cb8a5a6694b9afb265781 f25ec6210b33752dfa039a8dc1bece43f864cbea 80cc4c5d9a521e3dbe98bd508a08d395ea836537 87d3383bbaff352cd976d661d56f90d94f8f76a4 46fe7f63e316c7e14ff41e05dfcbbbf39567faf1 523850bc45ed640d3331e07932d9eae8785d33c6 abba806d405af9de44fea3734c542fa8ab7fef1b bff93a08471240e107704cd7c525ac747b0c93b6 8e35c0f713f37c76e0711ac7f862d02ed4c29d83 d1dc8e6038673de22946fddc8d41b22862bcb5a6 fdbe7a6005e59783075395aa3ba26c2b56f7afe5 a88282d70b8677712d5515ca697c46276840e774 |
@davide-negretti : As I worried, this was unable to be ported automatically to 7.x. If you feel this work could be ported to 7.x, then I'd appreciate it if you could find time to create a version of this PR against the Please let me know what approach you feel is best. |
@tdonohue I'm going to try to port it manually, I'll let youknow if the merge conflicts can be easily handled |
|
References
Description
Purpose of this PR:
List of changes
*-menu-item
components)<nav>
tag now contains navigation links only, as required by semantic HTML specificationAccessibility
In order to test overall accessibility I used this Chrome extension that provides a visual representation of how screen readers render the page:
https://chromewebstore.google.com/detail/aria-devtools/dneemiigcbbgbdjlcdjjnianlikimpck
This is how the current layout is rendered:
admin sidebar
header
And this is how it is rendered with this PR:
I also checked for errors with this Chrome extensions and there are none:
https://chromewebstore.google.com/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh
Note that
menu
andmenuitem
are now being used, and dropdown menus are better handled.Instruction for reviewers
Future improvements
These components still require some changes, for which I'm going to open a new issue:
Checklist
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.