-
Notifications
You must be signed in to change notification settings - Fork 286
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
Any key press toggles module settings open/close #5915
Comments
@tofumatt would you please advise around what we should support for keystrokes here? |
@sashadoes Looks good, just a question about this part of the IB:
What does this mean? I don't quite understand, sorry 😅 |
@tofumatt Like -> Like: |
Thanks, all good then 👍🏻 IB ✅ |
QA Update ❌
Issue > Now keyboard navigation is working but currently user is not able to know that they can perform an action to expand the UI. When I press tab key it is navigating me to the module settings but showing no indicator that I successfully switched to particular module header and I can expand settings interface for the module using keys. OS : windows Recording.34.mp4 |
@aaemnnosttv For the above issue I reported here we have separate ticket #6037 as per Asvin. |
@mohitwp the element does appear to have the necessary |
Confirmed that this fulfils the ACs and further styling work can (and should) be part of #6037. Adding styles to this issue isn't needed and will complicate it, but for now screen readers will have the context that these elements are expandable. Technically it's not great for sighted keyboard users, but at least they have the aria elements, so I think we can consider the QA passed for this and handle styling in the follow-up issue mentioned 👍🏻 |
QA Update ✅Thank you @aaemnnosttv @tofumatt.
Recording.34.mp4 |
Bug Description
Currently the settings for connected services is overly sensitive to key down events. Any key press toggles the open/close of the settings when the header is focused.
The problematic line appears to be here, which uses the same handler for clicks as key down events.
site-kit-wp/assets/js/components/settings/SettingsActiveModule/Header.js
Line 109 in 1cd8626
Steps to reproduce
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Enter
/Return
.Space
could also be acceptable, but in this case it should be fine to have it expand only when usingEnter
/Return
so users can still use spacebar to scroll the page.keyDown
on with theEnter
/Return
key,aria
attributes should be present letting the user know they can perform an action to expand the UI.Implementation Brief
assets/js/components/settings/SettingsActiveModule/Header.js
onKeyDown
for "onKeyDown" eventsite-kit-wp/assets/js/components/settings/SettingsActiveModule/Header.js
Line 109 in 1cd8626
headerRef
usinguseRef()
.onKeyDown
event handler implement a logic based on element focus and key pressed. eg:tabIndex
in the Header container should be set to "0" for accessibility(To consider: introduce
:focus-within
style for the Header to make the focus more noticeable.)Test Coverage
Cover key down open/close events functionality with tests.
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: