idiotbox-go

youtube web application in Go
git clone git://git.codemadness.org/idiotbox-go
Log | Files | Refs | README | LICENSE

commit e265ad2ee4e90dce036c70f6810abe062aabd178
parent 6667f85046aea52d9261e4d69e6c12b36eb70a12
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 16 Sep 2017 21:27:28 +0200

accessibility: add accesskeys

Diffstat:
data/templates/pages/search.html | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/data/templates/pages/search.html b/data/templates/pages/search.html @@ -11,15 +11,15 @@ <table class="search" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%" class="input"> - <input type="search" name="q" value="{{.Query}}" placeholder="Search..." size="72" autofocus="autofocus" class="search" /> + <input type="search" name="q" value="{{.Query}}" placeholder="Search..." size="72" autofocus="autofocus" class="search" accesskey="f" /> </td> <td nowrap class="nowrap"> <input type="submit" value="Search" class="button" /> <label>Style: </label> {{if eq .Mode "light"}} - <a href="?m=dark&q={{.Query}}" title="Dark mode">Dark</a> + <a href="?m=dark&q={{.Query}}" title="Dark mode" accesskey="s">Dark</a> {{else}} - <a href="?m=light&q={{.Query}}" title="Light mode">Light</a> + <a href="?m=light&q={{.Query}}" title="Light mode" accesskey="s">Light</a> {{end}} </td> </tr> @@ -32,7 +32,7 @@ <table class="videos" width="100%" border="0" cellpadding="0" cellspacing="0"> {{if .Searchresult.Videolist.Items}} <tbody> - {{range .Searchresult.Videolist.Items}} + {{range $i, $item := .Searchresult.Videolist.Items}} <tr> <td class="thumb" width="120" align="center"> {{if .Snippet.Thumbnails.Default.Url}} @@ -40,7 +40,7 @@ {{end}} </td> <td title="{{.Snippet.Description}}"> - <span class="title"><a href="https://www.youtube.com/watch?v={{.Id}}">{{.Snippet.Title}}</a></span><br/> + <span class="title"><a href="https://www.youtube.com/watch?v={{.Id}}" accesskey="{{$i}}">{{.Snippet.Title}}</a></span><br/> <span class="channel" title="{{.Snippet.Channeltitle}} RSS/Atom feed"><a href="https://www.youtube.com/feeds/videos.xml?channel_id={{.Snippet.Channelid}}">{{.Snippet.Channeltitle}}</a></span><br/> <span class="publishedat" title="{{.Snippet.Publishedat}}">Published: {{Friendlytime .Snippet.Publishedat}}</span><br/> <span class="stats"> @@ -66,13 +66,13 @@ <tr> <td align="left" class="nowrap" nowrap> {{if .Searchresult.Searchlist.Prevpagetoken}} - <a href="?q={{.Query}}&next={{.Searchresult.Searchlist.Prevpagetoken}}&m={{.Mode}}" rel="prev nofollow">&larr; prev</a> + <a href="?q={{.Query}}&next={{.Searchresult.Searchlist.Prevpagetoken}}&m={{.Mode}}" rel="prev nofollow" accesskey="p">&larr; prev</a> {{end}} </td> <td></td> <td align="right" nowrap class="a-r nowrap"> {{if .Searchresult.Searchlist.Nextpagetoken}} - <a href="?q={{.Query}}&next={{.Searchresult.Searchlist.Nextpagetoken}}&m={{.Mode}}" rel="next nofollow">next &rarr;</a> + <a href="?q={{.Query}}&next={{.Searchresult.Searchlist.Nextpagetoken}}&m={{.Mode}}" rel="next nofollow" accesskey="n">next &rarr;</a> {{end}} </td> </tr>