[new GUI] arrow keys left/right should be disabled when keyboard focus is active inside modals
Also, I notice that when I activate a TOC link the focus remains inside the navigation panel (instead of automatically reaching into the content area) ... I totally understand the rationale for this in the context of the new GUI design but we need to make sure that screen reader users who were used to pre-3.x experience don't feel completely lost. I am wondering what to do...
In Thorium 2.4, hitting ENTER on a TOC link redirects the keyboard focus to the content area, consequently a screen reader automatically reaches the publication HTML that the user hyperlinked into. The keyboard modifiers SHIFT CONTROL ALT can be used to keep the navigation panel open and preserve the keyboard focus inside the TOC (or landmarks, or page list, or search results, etc.) Thorium 3.x breaks this established UX pattern. Not sure what we should do...
Technical reference: shortcutEnable React state + prop drilling:
https://github.com/edrlab/thorium-reader/blob/0a430ace83d339d6a11789979b0dfa86ab690b9a/src/renderer/reader/components/Reader.tsx#L1721-L1736
...note the hack (EDIT: this event name seems unused, probably needs to be removed now)
https://github.com/edrlab/thorium-reader/blob/0a430ace83d339d6a11789979b0dfa86ab690b9a/src/renderer/reader/components/Reader.tsx#L438-L442
Also, I am not sure how this is handled now with the new GUI lib:
https://github.com/edrlab/thorium-reader/blob/0a430ace83d339d6a11789979b0dfa86ab690b9a/src/renderer/reader/components/Reader.tsx#L2198-L2212
https://github.com/edrlab/thorium-reader/blob/0a430ace83d339d6a11789979b0dfa86ab690b9a/src/renderer/reader/components/Reader.tsx#L2550-L2562
To be clear for the scope of this issue, that is only this : "arrow keys left/right should be disabled when keyboard focus is active inside modals" or do I miss something ?
all keyboard shortcut for the navigation should be disabled, right ? Not only arrow left and right ?
understood, I added a ternary on shortcutEnable both on Settings and Menu to disable shortcut when the menu is open and in full mode (undocked mode)
I prepare a commit to close this issue.
Daniel feel free to reopen it :)