plone / volto

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

a11y - edit page - sidebar objectBrowser button - cms ui #5221

Open Wagner3UB opened 1 year ago

Wagner3UB commented 1 year ago

Describe the bug The objectBrowser button to access the "choose target", besides lacking an associated label and a correct role, unexpected open when focused via keyboard pressing Tab or Shift+Tab. The focus disappears, and there is no keyboard-based exit "choose target", is a blocking issue.

To Reproduce Steps to reproduce the behavior:

1- Go to https://demo.plone.org/edit 2- enter in edit mode by clicking on the edit button (top-left) 3- Press inside the right sidebar 5- Navigate using tab key until find a objectBrowser button

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem. https://github.com/plone/volto/assets/60133113/9e21b4a5-833b-4f12-b6b2-18f5e976db92

ASCE-D commented 1 year ago

Hello @Wagner3UB I want to contribute in this project, I looked into the issue and reproduced it, I was going thorough the codebase to solve this issue and I could not find where keyboard handlers are assigned. src/components/manage/Sidebar/ObjectBrowserBody.jsx > toggleSearchInput = () => { // Toggle visibility of the search input this.setState(prevState => ({ showSearchInput: !prevState.showSearchInput, }), () => { if (this.state.showSearchInput) { // If search input is shown, focus on it this.searchInputRef.current.focus(); } });

as we can see here the handler just focus and doesn't opens the menu so Is there anywhere else where this keyboard navigation is handled? If not and you know how can I fix this please help me as I'm new to open source and really want to contribute.

Wagner3UB commented 1 year ago

@ASCE-D please read and follow Contributing to Plone and First-time contributors

JeffersonBledsoe commented 3 weeks ago

Going to use this comment to think out-loud about the current and potential expected behaviour of the object browser widget:

Current

Expected

JeffersonBledsoe commented 3 weeks ago

I started working on a refresh based on the new semantics I discussed above. Screenshots below of some prototyping (there's obvious things wrong with it but it will help clarifying the semantics by seeing it visually)

Screenshot 2024-09-27 at 11 17 32 Screenshot 2024-09-27 at 11 32 18

However, I think this changes the UX too much so I'm going to raise this in the next Volto meeting and we can discuss the various use cases and how we can accommodate those while improving the accessibility of the widget.