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

0114-WebUI-Improvement-Keyboard-Scroll-Control-After-Page-Change #1144

Conversation

theimo1221
Copy link
Contributor

Description

To allow easier WebUI handling with keyboard (e.g. Scrolling), on page change now the main content area get's focussed if at that time no other element has the focus.
Steps needed:

  1. Make #content container focusable
  2. Focus #content on page change

To prevent any bad stylings due to focus by chromes default outlining of focus elements this is now disabled for the #content container.

Related Issue

This resolves #904

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Alternate Designs

As an alternative one could capture keypresses like PageUp/-Down on the body element and perform scroll actions by script.
But imo we should rely on default browser behavior instead of recreating it.

That's why I prefer giving focus to the (scrollable) content element if at that time no other field has focus.

Possible Drawbacks

Only imaginable drawback are some keyboardevents which now trigger first on the #content container before bubbling to the body and document. But I highly doubt that.

Verification Process

While switching to different views and focussing some input fields I noticed no change in behavior (as expected). While at the same time, wherever the #content area had a scrollbar I was able to scroll it by keyboard, without clicking beforehand.

Release Notes

Directly enabling Keyboard Controls (like Scrolling) on page changes

Contributing checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING and LICENSE document.
  • I fully agree to distribute my changes under Apache 2.0 license.

@jens-maus jens-maus added 💡 enhancement-ideas New feature or change request 🏷️ WebUI This refs the WebUI component labels Feb 19, 2021
@jens-maus jens-maus added this to the next release milestone Feb 19, 2021
@jens-maus jens-maus merged commit 5ed0dc8 into jens-maus:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement-ideas New feature or change request 🏷️ WebUI This refs the WebUI component
Projects
Development

Successfully merging this pull request may close these issues.

WebUI Ansicht soll nach Laden kein Mausklick benötigen, damit per Keyboard navigiert werden kann
2 participants