Closed jdknight closed 2 years ago
Hi, I don't think this is the way to go here. Sphinx has a navigation_with_keys
configuration item for themes, which is good-enough here.
I'd rather we add that instead of these custom accesskeys.
Thanks for pointing out the navigation_with_keys
option, I wasn't aware of it.
Finding https://github.com/sphinx-doc/sphinx/pull/9337 (which you are already aware of), has provided me a bit more understanding of the state of navigation keys in Sphinx. My first impressions of looking at the use of the accesskey
attribute (when used in the Read the Docs Sphinx Theme) was that this attribute would be the best way forward (browser managed and non-JavaScript). Although reading more about accessibility concerns has given me some doubt.
I still have a gut feeling that the ability to configure either JavaScript-based navigation keys and accesskeys could be beneficial in for some use cases (not just for this theme, but any Sphinx HTML theme), but I would have to research a bit more -- most likely wait for the discussion on that other pull request (https://github.com/sphinx-doc/sphinx/pull/9337) to close out.
In addition, this change request is limited -- I would assume if anything like this were to be introduced, the accesskey values should be more customizable (configuration and/or language/keyboards hints). Therefore, marking as closed.
Adding access keys for the "previous" and "next" page references to allow users to easily toggle between pages via a keyboard.