foam-framework / foam

Feature-Oriented Active Modeller
Apache License 2.0
787 stars 55 forks source link

Added key focus UI and arrow key navigation to acalc #571

Closed zainafzal08 closed 5 years ago

zainafzal08 commented 5 years ago

This is part of a series of accessibility fixes to acalc, a halo is now displayed when a button has keyboard focus and you can navigate around the application with the arrow keys.

In addition the tab index order was tweeked to make more logical sense (app -> history -> display -> buttons), additional fixes to the tab order which make screen readers function better is also on the way.

The way the arrow key functionality works is by attaching query selectors to data attributes on each key to build a "in html" graph. When a certain element is focused and a arrow key is used the focused elements data attributes are used to find the neighbors of the elements and move focus as needed.