Open tim-janik opened 6 years ago
For reference, what English Wikipedia supports is described at https://en.wikipedia.org/wiki/Wikipedia:Keyboard_shortcuts
I haven't written Haskell in quite some time, so bare with me.
As an example, "edit" links on English Wikipedia use key e as accesskey
. E.g. the main page has following HTML:
<a href="/w/index.php?title=Main_Page&action=edit" title="This page is protected.
You can view its source [Alt+Shift+e]" accesskey="e"><span>View source</span></a>
In Gitit, the "edit" links have _edit
in their URL, and it seems to be generated by these lines of code of Gitit: https://github.com/jgm/gitit/blob/eed32638f4f6e3b2f4b8a9a04c4b72001acf9ad8/src/Network/Gitit/Layout.hs#L146-L153
It seems that it uses the function anchor
from Haskell module Text.XHtml.Strict
of xhtml
package. Same lines of code also use the href
function. Unfortunately, documentation in xhtml
package is a bit scarce, but it seems that it would be possible to add support of accesskey
attribute via function strAttr
.
The $tabs$ generated by gitit are unfortunately not editable via tempates/ so I'm filing this as a bug. Please add the accesskey attribute to the default HTML generated by gitit, along the lines Wikipedia does it: