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

Accessibility review #3384

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

morpheus-87
Copy link
Contributor

@morpheus-87 morpheus-87 commented Feb 8, 2021

This PR fixes some things that were found in our accessability review:

  • change element for search hit title from h6 to a div, our reviewers said wrapping them in a headline wasn’t neccessary, since it’s already part of a <ul>, which suffices for screenreaders to properly interpret the structure
  • make some accessability labels more meaningful
  • add some missing aria attributes

@morpheus-87 morpheus-87 changed the title A11y fixes Accessability review Feb 8, 2021
Copy link
Collaborator

@ggeisler ggeisler left a comment

Choose a reason for hiding this comment

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

👍 on the H6 -> div update, and the "Submit search" to "Search in the document" aria label update.

On changing the sidebar toggle button label from "Toggle sidebar" to "Show / hide sidebar" I'm not as sure. I have a couple of thoughts about this:

  • I see the comment from the accessibility review report (note that I'm reading the English translation, which I believe is just Google Translate, so it's possible the advice is different in the original German report) on page 17 about how the German-language button label is not meaningful ("Switch sidebar" is what the translated report says it reads). But "Toggle sidebar" is meaningful in English, so one solution is to leave the English label as is and just update the German translation to whatever makes more sense in German than the literal translation of "toggle".

  • If we do want to change the label to "Show / hide sidebar" I think that would be great, but only if we can use the specific label for the current state of the sidebar. For instance, if we can display the label "Show sidebar" when the sidebar is closed, and "Hide sidebar" when the sidebar is open. I think that is better than "Toggle sidebar". But "Show / hide sidebar" for both states feels like we are taking a shortcut. And it's inconsistent with the nearby expand/collapse sidebar button, where we do show the appropriate label for the current state ("Collapse sidebar" when it's open and "Expand sidebar" when it's closed).

@morpheus-87
Copy link
Contributor Author

morpheus-87 commented Feb 10, 2021

Thank you very much for your feedback, @ggeisler ! The text from our accessability review was the following:

The "Toggle sidebar" and "Close sidebar" controls relate to different elements. You must clearly name the respective element. The name of the control element "Toggle sidebar" does not describe the function very clearly and should, for example, be named in "Show / hide sidebar".

But you are right, the label should depend on the current state of the sidebar 👍 I will fix that.
I have just another question: is there any reason to have two elements (see the following screenshot) for toggling the sidebar?
screenshot-mirador-dev netlify app-2021 02 10-12_44_17

@morpheus-87 morpheus-87 force-pushed the a11y-fixes branch 2 times, most recently from 04e8776 to fd9360e Compare February 10, 2021 12:50
@codecov-io
Copy link

codecov-io commented Feb 10, 2021

Codecov Report

Merging #3384 (d73e1ca) into master (4150d18) will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3384      +/-   ##
==========================================
+ Coverage   89.06%   89.17%   +0.11%     
==========================================
  Files         196      196              
  Lines        3393     3382      -11     
==========================================
- Hits         3022     3016       -6     
+ Misses        371      366       -5     
Impacted Files Coverage Δ
src/components/SearchHit.js 100.00% <ø> (ø)
src/components/SearchPanel.js 100.00% <ø> (ø)
src/state/sagas/windows.js 86.51% <0.00%> (-0.44%) ⬇️
src/i18n.js 100.00% <0.00%> (ø)
src/config/settings.js 0.00% <0.00%> (ø)
src/extend/withPlugins.js 100.00% <0.00%> (ø)
src/components/SearchResults.js 100.00% <0.00%> (ø)
src/components/SearchPanelNavigation.js 100.00% <0.00%> (+4.16%) ⬆️
src/state/selectors/searches.js 90.54% <0.00%> (+4.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4150d18...82495dc. Read the comment docs.

@morpheus-87
Copy link
Contributor Author

I also just added one more aria-expanded attribute.

@ggeisler
Copy link
Collaborator

@morpheus-87 Thanks for working on the updates!

I have just another question: is there any reason to have two elements (see the following screenshot) for toggling the sidebar?

The difference between the two elements is subtle, but intentional.

Toggle sidebar

Screen Shot 2021-02-10 at 10 55 54 AM


This enables an implementer to configure the sidebar to be completely closed by default, so the user can focus on the workspace area without any interference from any UI controls in the workspace area. We do this at Stanford, for example, when using the Mirador viewer as an item viewer in various catalog-like pages, where the item metadata is often already on the page outside of the viewer and we don't expect most users to need to use the sidebar at all. So we give the user the cleanest view of the item but also an easy way to open the sidebar if they want to.

Expand/collapse sidebar

Screen Shot 2021-02-10 at 10 55 01 AM


This enables the user who does open the sidebar to collapse it to de-clutter the workspace (when zooming and panning on the image, for example) but the visible tab to re-expand the sidebar serves as a reminder of sorts that the sidebar can be re-expanded and that there are other sidebar categories available. (Notice that when the sidebar is collapsed, the sidebar menu is still visible, while when the sidebar is closed it is not.) Again, I know the difference is subtle, but the idea is that the visible tab might be more handy for the user who is opening and closing the sidebar frequently while they examine and work with the item, looking at the different sidebar category content, etc.

ggeisler
ggeisler previously approved these changes Feb 10, 2021
Copy link
Collaborator

@ggeisler ggeisler left a comment

Choose a reason for hiding this comment

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

I don't really have a Mirador dev environment working so I can't easily see these updates, but based on the file changes and what @morpheus-87 says he is trying to do, I assume this is good to go. I can double-check after the PR is merged and the updates are visible in the Mirador demo instance.

EDIT: I forgot about the Netlify preview. I checked that out and it looks good to me.

@morpheus-87
Copy link
Contributor Author

Thank you very much for your explanation, @ggeisler ! That makes totally sense to me 👍

I also tried to fix the integration tests, but I don't understand, why one of them is failing 🤔

@morpheus-87
Copy link
Contributor Author

Could someone please help me with the integration tests? Perhaps @mejackreed ?

@codecov-commenter
Copy link

Codecov Report

Merging #3384 (d73e1ca) into master (04c5b67) will decrease coverage by 3.32%.
The diff coverage is n/a.

❗ Current head d73e1ca differs from pull request most recent head b5f3521. Consider uploading reports for the commit b5f3521 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3384      +/-   ##
==========================================
- Coverage   92.49%   89.17%   -3.32%     
==========================================
  Files         201      196       -5     
  Lines        3465     3382      -83     
==========================================
- Hits         3205     3016     -189     
- Misses        260      366     +106     
Files Changed Coverage Δ
src/components/SearchHit.js 100.00% <ø> (ø)
src/components/SearchPanel.js 100.00% <ø> (ø)

... and 111 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@morpheus-87 morpheus-87 changed the title Accessability review Accessibility review Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants