Merge pull request #1075 from kiwix/kiwix-server-accesskeys

Add Kiwix server a few accesskeys
This commit is contained in:
Kelson 2024-05-11 11:23:35 +02:00 committed by GitHub
commit 016072292c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 4 deletions

View File

@ -93,7 +93,7 @@
</div> </div>
</div> </div>
<form id='kiwixSearchForm' class='kiwixNav__SearchForm'> <form id='kiwixSearchForm' class='kiwixNav__SearchForm'>
<input type="text" name="q" placeholder="Search" id="searchFilter" class='kiwixSearch filter'> <input type="text" name="q" accesskey="s" placeholder="Search" id="searchFilter" class='kiwixSearch filter'>
<span class="kiwixButton tagFilterLabel"></span> <span class="kiwixButton tagFilterLabel"></span>
<input type="submit" class="kiwixButton kiwixButtonHover" id="searchButton" value="Search"/> <input type="submit" class="kiwixButton kiwixButtonHover" id="searchButton" value="Search"/>
</form> </form>

View File

@ -90,7 +90,7 @@
</div> </div>
</div> </div>
<form id='kiwixSearchForm' class='kiwixNav__SearchForm' action="{{root}}/nojs"> <form id='kiwixSearchForm' class='kiwixNav__SearchForm' action="{{root}}/nojs">
<input type="text" name="q" placeholder="{{translations.search}}" id="searchFilter" class='kiwixSearch filter' value="{{searchQuery}}"> <input type="text" name="q" accesskey="s" placeholder="{{translations.search}}" id="searchFilter" class='kiwixSearch filter' value="{{searchQuery}}">
<input type="submit" class="kiwixButton kiwixButtonHover" value="{{translations.search}}"/> <input type="submit" class="kiwixButton kiwixButtonHover" value="{{translations.search}}"/>
</form> </form>
</div> </div>

View File

@ -45,14 +45,22 @@
<input type="checkbox" id="kiwix_button_show_toggle"> <input type="checkbox" id="kiwix_button_show_toggle">
<label for="kiwix_button_show_toggle"><img src="./skin/caret.png?KIWIXCACHEID" alt=""></label> <label for="kiwix_button_show_toggle"><img src="./skin/caret.png?KIWIXCACHEID" alt=""></label>
<div class="kiwix_button_cont"> <div class="kiwix_button_cont">
<a id="kiwix_serve_taskbar_library_button" title="Go to welcome page" aria-label="Go to welcome page" href="./"><button>&#x1f3e0;</button></a> <a id="kiwix_serve_taskbar_library_button"
title="Go to welcome page"
accesskey="w"
aria-label="Go to welcome page"
href="./">
<button>&#x1f3e0;</button>
</a>
<span id="kiwix_serve_taskbar_book_ui_group"> <span id="kiwix_serve_taskbar_book_ui_group">
<a id="kiwix_serve_taskbar_home_button" <a id="kiwix_serve_taskbar_home_button"
title="Go to the main page of the current book" title="Go to the main page of the current book"
accesskey="h"
aria-label="Go to the main page of the current book" aria-label="Go to the main page of the current book"
onclick="gotoMainPageOfCurrentBook()"></a> onclick="gotoMainPageOfCurrentBook()"></a>
<a id="kiwix_serve_taskbar_random_button" <a id="kiwix_serve_taskbar_random_button"
title="Go to a randomly selected page" title="Go to a randomly selected page"
accesskey="r"
aria-label="Go to a randomly selected page" aria-label="Go to a randomly selected page"
onclick="gotoRandomPage()"> onclick="gotoRandomPage()">
<button>&#x1F3B2;</button> <button>&#x1F3B2;</button>

View File

@ -1171,7 +1171,7 @@ TEST_F(LibraryServerTest, no_name_mapper_catalog_v2_individual_entry_access)
" </div>\n" \ " </div>\n" \
" </div>\n" \ " </div>\n" \
" <form id='kiwixSearchForm' class='kiwixNav__SearchForm' action=\"/ROOT%23%3F/nojs\">\n" \ " <form id='kiwixSearchForm' class='kiwixNav__SearchForm' action=\"/ROOT%23%3F/nojs\">\n" \
" <input type=\"text\" name=\"q\" placeholder=\"Search\" id=\"searchFilter\" class='kiwixSearch filter' value=\"\">\n" \ " <input type=\"text\" name=\"q\" accesskey=\"s\" placeholder=\"Search\" id=\"searchFilter\" class='kiwixSearch filter' value=\"\">\n" \
" <input type=\"submit\" class=\"kiwixButton kiwixButtonHover\" value=\"Search\"/>\n" \ " <input type=\"submit\" class=\"kiwixButton kiwixButtonHover\" value=\"Search\"/>\n" \
" </form>\n" \ " </form>\n" \
" </div>\n" " </div>\n"