@@ -30,9 +30,9 @@
30 <div class="col-sm-11 col-md-10">
30 <div class="col-sm-11 col-md-10">
31 {% include 'oscar/categories.html' %}
31 {% include 'oscar/categories.html' %}
33− <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
33+ <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
34 {% else %}
34 {% else %}
35− <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
35+ <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
36 <div class="col-sm-11 col-md-10 search-categories">
36 <div class="col-sm-11 col-md-10 search-categories">
37 {% include 'oscar/categories.html' %}
37 {% include 'oscar/categories.html' %}
@@ -40,14 +40,14 @@
41 {% set language_label = _('Search language') %}
41 {% set language_label = _('Search language') %}
42 {% set language_info = _('What language do you prefer for search?') %}
42 {% set language_info = _('What language do you prefer for search?') %}
43− {{ preferences_item_header(language_info, language_label, rtl) }}
43+ {{ preferences_item_header(language_info, language_label, rtl, 'language') }}
44 {% include 'oscar/languages.html' %}
44 {% include 'oscar/languages.html' %}
45 {{ preferences_item_footer(language_info, language_label, rtl) }}
45 {{ preferences_item_footer(language_info, language_label, rtl) }}
47 {% set locale_label = _('Interface language') %}
47 {% set locale_label = _('Interface language') %}
48 {% set locale_info = _('Change the language of the layout') %}
48 {% set locale_info = _('Change the language of the layout') %}
49− {{ preferences_item_header(locale_info, locale_label, rtl) }}
49+ {{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
50− <select class="form-control" name='locale'>
50+ <select class="form-control" name="locale" id="locale">
51 {% for locale_id,locale_name in locales.items() | sort %}
51 {% for locale_id,locale_name in locales.items() | sort %}
52 <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
52 <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
53 {% endfor %}
53 {% endfor %}
@@ -56,8 +56,8 @@
57 {% set autocomplete_label = _('Autocomplete') %}
57 {% set autocomplete_label = _('Autocomplete') %}
58 {% set autocomplete_info = _('Find stuff as you type') %}
58 {% set autocomplete_info = _('Find stuff as you type') %}
59− {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }}
59+ {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
60− <select class="form-control" name="autocomplete">
60+ <select class="form-control" name="autocomplete" id="autocomplete">
61 <option value=""> - </option>
61 <option value=""> - </option>
62 {% for backend in autocomplete_backends %}
62 {% for backend in autocomplete_backends %}
63 <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
63 <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
@@ -67,8 +67,8 @@
68 {% set image_proxy_label = _('Image proxy') %}
68 {% set image_proxy_label = _('Image proxy') %}
69 {% set image_proxy_info = _('Proxying image results through searx') %}
69 {% set image_proxy_info = _('Proxying image results through searx') %}
70− {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl) }}
70+ {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
71− <select class="form-control" name='image_proxy'>
71+ <select class="form-control" name="image_proxy" id="image_proxy">
72 <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
72 <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
73 <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
73 <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
@@ -76,8 +76,8 @@
77 {% set method_label = _('Method') %}
77 {% set method_label = _('Method') %}
78 {% set method_info = _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') %}
78 {% set method_info = _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') %}
79− {{ preferences_item_header(method_info, method_label, rtl) }}
79+ {{ preferences_item_header(method_info, method_label, rtl, 'method') }}
80− <select class="form-control" name='method'>
80+ <select class="form-control" name="method" id="method">
81 <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
81 <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
82 <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
82 <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
@@ -85,8 +85,8 @@
86 {% set safesearch_label = _('SafeSearch') %}
86 {% set safesearch_label = _('SafeSearch') %}
87 {% set safesearch_info = _('Filter content') %}
87 {% set safesearch_info = _('Filter content') %}
88− {{ preferences_item_header(safesearch_info, safesearch_label, rtl) }}
88+ {{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
89− <select class="form-control" name='safesearch'>
89+ <select class="form-control" name="safesearch" id="safesearch">
90 <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
90 <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
91 <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
91 <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
92 <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
92 <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
@@ -95,16 +95,16 @@
96 {% set theme_label = _('Themes') %}
96 {% set theme_label = _('Themes') %}
97 {% set theme_info = _('Change searx layout') %}
97 {% set theme_info = _('Change searx layout') %}
98− {{ preferences_item_header(theme_info, theme_label, rtl) }}
98+ {{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
99− <select class="form-control" name="theme">
99+ <select class="form-control" name="theme" id="theme">
100 {% for name in themes %}
100 {% for name in themes %}
101 <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
101 <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
102 {% endfor %}
102 {% endfor %}
103 </select>
103 </select>
104 {{ preferences_item_footer(theme_info, theme_label, rtl) }}
104 {{ preferences_item_footer(theme_info, theme_label, rtl) }}
106− {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl) }}
106+ {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
107− <select class="form-control" name='oscar-style'>
107+ <select class="form-control" name="oscar-style" id="oscar_style">
108 <option value="logicodev" >Logicodev</option>
108 <option value="logicodev" >Logicodev</option>
109 <option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
109 <option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
110 <option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
110 <option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
@@ -113,8 +113,8 @@
114 {% set label = _('Results on new tabs') %}
114 {% set label = _('Results on new tabs') %}
115 {% set info = _('Open result links on new browser tabs') %}
115 {% set info = _('Open result links on new browser tabs') %}
116− {{ preferences_item_header(info, label, rtl) }}
116+ {{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
117− <select class="form-control" name='results_on_new_tab'>
117+ <select class="form-control" name="results_on_new_tab" id="results_on_new_tab">
118 <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
118 <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
119 <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
119 <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
120 </select>
120 </select>
@@ -122,8 +122,8 @@
123 {% set label = _('Open Access DOI resolver') %}
123 {% set label = _('Open Access DOI resolver') %}
124 {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
124 {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
125− {{ preferences_item_header(info, label, rtl) }}
125+ {{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
126− <select class="form-control" id='doi_resolver' name='doi_resolver'>
126+ <select class="form-control" name="doi_resolver" id="doi_resolver">
127 {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
127 {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
128 <option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}>
128 <option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}>
129 {{ doi_resolver_name }} - {{ doi_resolver_url }}
129 {{ doi_resolver_name }} - {{ doi_resolver_url }}
@@ -134,8 +134,8 @@
135 {% set label = _('Engine tokens') %}
135 {% set label = _('Engine tokens') %}
136 {% set info = _('Access tokens for private engines') %}
136 {% set info = _('Access tokens for private engines') %}
137− {{ preferences_item_header(info, label, rtl) }}
137+ {{ preferences_item_header(info, label, rtl, 'tokens') }}
138− <input class="form-control" id='tokens' name='tokens' value='{{ preferences.tokens.get_value() }}'/>
138+ <input class="form-control" id="tokens" name="tokens" value='{{ preferences.tokens.get_value() }}'/>
139 {{ preferences_item_footer(info, label, rtl) }}
139 {{ preferences_item_footer(info, label, rtl) }}
141 </fieldset>
141 </fieldset>
@@ -173,23 +173,23 @@
173 <table class="table table-hover table-condensed table-striped">
173 <table class="table table-hover table-condensed table-striped">
175 {% if not rtl %}
175 {% if not rtl %}
176− <th>{{ _("Allow") }}</th>
176+ <th scope="col">{{ _("Allow") }}</th>
177− <th>{{ _("Engine name") }}</th>
177+ <th scope="col">{{ _("Engine name") }}</th>
178− <th>{{ _("Shortcut") }}</th>
178+ <th scope="col">{{ _("Shortcut") }}</th>
179− <th>{{ _("Selected language") }}</th>
179+ <th scope="col">{{ _("Selected language") }}</th>
180− <th>{{ _("SafeSearch") }}</th>
180+ <th scope="col">{{ _("SafeSearch") }}</th>
181− <th>{{ _("Time range") }}</th>
181+ <th scope="col">{{ _("Time range") }}</th>
182− <th>{{ _("Avg. time") }}</th>
182+ <th scope="col">{{ _("Avg. time") }}</th>
183− <th>{{ _("Max time") }}</th>
183+ <th scope="col">{{ _("Max time") }}</th>
184 {% else %}
184 {% else %}
185− <th class="text-right">{{ _("Max time") }}</th>
185+ <th scope="col" class="text-right">{{ _("Max time") }}</th>
186− <th class="text-right">{{ _("Avg. time") }}</th>
186+ <th scope="col" class="text-right">{{ _("Avg. time") }}</th>
187− <th class="text-right">{{ _("Time range") }}</th>
187+ <th scope="col" class="text-right">{{ _("Time range") }}</th>
188− <th class="text-right">{{ _("SafeSearch") }}</th>
188+ <th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
189− <th class="text-right">{{ _("Selected language") }}</th>
189+ <th scope="col" class="text-right">{{ _("Selected language") }}</th>
190− <th class="text-right">{{ _("Shortcut") }}</th>
190+ <th scope="col" class="text-right">{{ _("Shortcut") }}</th>
191− <th class="text-right">{{ _("Engine name") }}</th>
191+ <th scope="col" class="text-right">{{ _("Engine name") }}</th>
192− <th class="text-right">{{ _("Allow") }}</th>
192+ <th scope="col" class="text-right">{{ _("Allow") }}</th>
193 {% endif %}
193 {% endif %}
195 {% for search_engine in engines_by_category[categ] %}
195 {% for search_engine in engines_by_category[categ] %}
@@ -199,21 +199,21 @@
199 <td class="onoff-checkbox">
199 <td class="onoff-checkbox">
200 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
200 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
202− <th>{{ search_engine.name }}</th>
202+ <th scope="row">{{ search_engine.name }}</th>
203 <td class="name">{{ shortcuts[search_engine.name] }}</td>
203 <td class="name">{{ shortcuts[search_engine.name] }}</td>
204 <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
204 <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
205 <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
205 <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
206 <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
206 <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
207− <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
207+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{% if stats[search_engine.name]['warn_time'] %}{{ icon('exclamation-sign')}} {% endif %}{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
208− <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
208+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{% if stats[search_engine.name]['warn_timeout'] %}{{ icon('exclamation-sign') }} {% endif %}{{ search_engine.timeout }}</td>
209− {% else %}
209+ {% else %}
210− <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
210+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
211− <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
211+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
212 <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
212 <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
213 <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
213 <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
214 <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
214 <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
215 <td>{{ shortcuts[search_engine.name] }}</td>
215 <td>{{ shortcuts[search_engine.name] }}</td>
216− <th>{{ search_engine.name }}</th>
216+ <th scope="row">{{ search_engine.name }}</th>
217 <td class="onoff-checkbox">
217 <td class="onoff-checkbox">
218 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
218 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
@@ -241,7 +241,7 @@
241 <h3 class="panel-title">{{ _(plugin.name) }}</h3>
241 <h3 class="panel-title">{{ _(plugin.name) }}</h3>
243 <div class="panel-body">
243 <div class="panel-body">
244− <div class="col-xs-6 col-sm-4 col-md-6">{{ _(plugin.description) }}</div>
244+ <div class="col-xs-6 col-sm-4 col-md-6"><label for="{{'plugin_' + plugin.id}}">{{ _(plugin.description) }}</label></div>
245 <div class="col-xs-6 col-sm-4 col-md-6">
245 <div class="col-xs-6 col-sm-4 col-md-6">
246 <div class="onoff-checkbox">
246 <div class="onoff-checkbox">
247 {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
247 {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}