This adds an event listener to catch focus events when clicking the
empty area below the file list. Users intuitively expect this to focus
the file list.
Fixes: https://github.com/pybricks/support/issues/856
This add use of the main and complementary roles (via semantic html
elements main and aside) to make it easy for assistive technologies
to jump to the major components of the app.
Since the terminal "steals" the tab key, we don't want to include it
in the keyboard tab list. It is still mouse focusable and we will
implement an landmark role for the terminal for assistive technologies.
- Use steps for the connection procedure
- Use categories (To do: consider making numbering consecutive)
- Show hub bootloader device name explicitly
- List official app to use for recovery (make V2/V3 explicit)
- Copy edit
Also fix the layout (class) of the installation panel to make it consistent with the style of the recovery panel.
Since there are up to three things to prepare, it is better to start the
list with that. We can still keep a separate section for points that match the video.
This persists the current docs page so that it is used on page reload
of the app. This is mostly useful for development since users should
not be refreshing the page.
It also remembers the selected page between sessions, so new windows
will open to the previous page.
Checks are added to default back to the docs index page in case the
"remembered" page is no longer valid.
This fixes issues where the index.html page can be served if we have
something that requests a static resource that does not exist. In the
worst case, this would the app appear recursively in the docs pane.
Also remove some unnecessary typing while we are touching this.
This adds use of sessionStorage for the documentation visibility toggle.
This way, when multiple windows are open, the docs can be controlled
separately in each window. Local storage is still used as the default
value for new windows.
Issue: https://github.com/pybricks/support/issues/807
The useLocalStorage hook synchronizes state between windows. In the
case of the activities tabs, we don't want this state synchronized,
otherwise changing a tab in one window would change the tab in all
open windows.
Instead, we can use sessionStorage so that the state persists when
refreshing or duplicating a browser tab. Local storage is still used
as the default value so that any new window that is opened will use
the last selected state.
Issue: https://github.com/pybricks/support/issues/807