plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
426 stars 575 forks source link

Sidebar and toolbar shrink/ expanded functionality should work correctly for screen reader users #5466

Open JeffersonBledsoe opened 5 months ago

JeffersonBledsoe commented 5 months ago

Describe the bug

Visual users are able to hide the toolbar or sidebar so that it does not get in the way of their editing. However, assistive technology users (such as screen reader users) are not able to do this. Pressing the 'shrink' button still allows the elements within the toolbar (or sidebar) to be focused and the current open/ closed state of the

To Reproduce Steps to reproduce the behavior:

  1. Start a screen reader
  2. Open a Volto page in edit mode
  3. Keep going 'next' with the screen reader to scroll through the toolbar elements until you reach "Shrink toolbar"
  4. Press "Enter" to shrink the toolbar
  5. Go "Back" with the screen reader

Expected behavior

Actual behaviour

Screenshots If applicable, add screenshots to help explain your problem.

Software (please complete the following information):

Additional context

JeffersonBledsoe commented 5 months ago

cc @Wagner3UB @ichim-david I've not done any user testing, wanted to get a 2nd/ 3rd opinion

ichim-david commented 5 months ago

@JeffersonBledsoe I agree with your assessment, we need to have programmatic expand shrink not just an aria-label chance like it was done in this pull request https://github.com/plone/volto/pull/5431/files#diff-5d80b3c9efb8cfe076943dc9e8d59c1bc866ffe00e911165c5ce35e3b6c5a380L185 Ai

Wagner3UB commented 5 months ago

I agree.

While I was thinking about it, another question came to mind:

In this case, I'm considering a user who is completely blind. For them, it makes absolutely no difference whether the toolbar is open or not, but the quantity of available elements at the moment does matter. Closing both bars will create a cleaner environment for the user doing this.

ichim-david commented 5 months ago

I agree.

While I was thinking about it, another question came to mind:

* When the toolbar/sidebar is closed, the elements inside of it must be visible to screen readers?

In this case, I'm considering a user who is completely blind. For them, it makes absolutely no difference whether the toolbar is open or not, but the quantity of available elements at the moment does matter. Closing both bars will create a cleaner environment for the user doing this.

This is why you have expanded or collapsed states, when the section is collapsed the focusable items shouldn't be focusable anymore until the section where they are is meant to be interacted with. When the toolbar is collapsed you are not meant to interact with the buttons inside the toolbar, the same should be for keyboard navigation or with screen readers.

Noobham commented 4 months ago

is this issue same as #5431

stevepiercy commented 4 months ago

@Noobham no, this is an issue. #5431 is a PR that you created to address #5118. I would say that they are all related.

The folks participating in the discussion on all these issues and PR should first decide on what should be done—maybe a checklist of tasks in one issue, closing the other—before anyone implements a fix in a PR.