Spaces:
Running
Running
fix: a11y `/assistants` and `/tools`
Browse files
src/routes/assistants/+page.svelte
CHANGED
@@ -127,17 +127,19 @@
|
|
127 |
href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/357"
|
128 |
class="ml-auto dark:text-gray-400 dark:hover:text-gray-300"
|
129 |
target="_blank"
|
|
|
130 |
>
|
131 |
<CarbonHelpFilled />
|
132 |
</a>
|
133 |
{/if}
|
134 |
</div>
|
135 |
-
<
|
136 |
<div class="mt-6 flex justify-between gap-2 max-sm:flex-col sm:items-center">
|
137 |
<select
|
138 |
class="mt-1 h-[34px] rounded-lg border border-gray-300 bg-gray-50 px-2 text-sm text-gray-900 focus:border-blue-700 focus:ring-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"
|
139 |
bind:value={data.selectedModel}
|
140 |
on:change={onModelChange}
|
|
|
141 |
>
|
142 |
<option value="">All models</option>
|
143 |
{#each data.models.filter((model) => !model.unlisted) as model}
|
@@ -224,11 +226,13 @@
|
|
224 |
bind:this={filterInputEl}
|
225 |
maxlength="150"
|
226 |
type="search"
|
|
|
227 |
/>
|
228 |
</div>
|
229 |
<select
|
230 |
bind:value={sortValue}
|
231 |
on:change={sortAssistants}
|
|
|
232 |
class="rounded-lg border border-gray-300 bg-gray-50 px-2 py-1 text-sm text-gray-900 focus:border-blue-700 focus:ring-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"
|
233 |
>
|
234 |
<option value={SortKey.TRENDING}>{SortKey.TRENDING}</option>
|
|
|
127 |
href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/357"
|
128 |
class="ml-auto dark:text-gray-400 dark:hover:text-gray-300"
|
129 |
target="_blank"
|
130 |
+
aria-label="Hub discussion about assistants"
|
131 |
>
|
132 |
<CarbonHelpFilled />
|
133 |
</a>
|
134 |
{/if}
|
135 |
</div>
|
136 |
+
<h2 class="text-gray-500">Popular assistants made by the community</h2>
|
137 |
<div class="mt-6 flex justify-between gap-2 max-sm:flex-col sm:items-center">
|
138 |
<select
|
139 |
class="mt-1 h-[34px] rounded-lg border border-gray-300 bg-gray-50 px-2 text-sm text-gray-900 focus:border-blue-700 focus:ring-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"
|
140 |
bind:value={data.selectedModel}
|
141 |
on:change={onModelChange}
|
142 |
+
aria-label="Filter assistants by model"
|
143 |
>
|
144 |
<option value="">All models</option>
|
145 |
{#each data.models.filter((model) => !model.unlisted) as model}
|
|
|
226 |
bind:this={filterInputEl}
|
227 |
maxlength="150"
|
228 |
type="search"
|
229 |
+
aria-label="Filter assistants by name"
|
230 |
/>
|
231 |
</div>
|
232 |
<select
|
233 |
bind:value={sortValue}
|
234 |
on:change={sortAssistants}
|
235 |
+
aria-label="Sort assistants"
|
236 |
class="rounded-lg border border-gray-300 bg-gray-50 px-2 py-1 text-sm text-gray-900 focus:border-blue-700 focus:ring-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"
|
237 |
>
|
238 |
<option value={SortKey.TRENDING}>{SortKey.TRENDING}</option>
|
src/routes/tools/+page.svelte
CHANGED
@@ -111,13 +111,14 @@
|
|
111 |
href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/357"
|
112 |
class="ml-auto dark:text-gray-400 dark:hover:text-gray-300"
|
113 |
target="_blank"
|
|
|
114 |
>
|
115 |
<CarbonHelpFilled />
|
116 |
</a>
|
117 |
{/if}
|
118 |
</div>
|
119 |
-
<
|
120 |
-
<
|
121 |
This feature is <span
|
122 |
class="rounded-lg bg-purple-100 px-2 py-1 font-semibold dark:bg-purple-800/50"
|
123 |
>experimental</span
|
@@ -127,7 +128,7 @@
|
|
127 |
href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/569"
|
128 |
target="_blank">sharing your feedback with us!</a
|
129 |
>
|
130 |
-
</
|
131 |
<div class="ml-auto mt-6 flex justify-between gap-2 max-sm:flex-col sm:items-center">
|
132 |
{#if data.user?.isAdmin}
|
133 |
<label class="mr-auto flex items-center gap-1 text-red-500" title="Admin only feature">
|
@@ -216,12 +217,14 @@
|
|
216 |
bind:this={filterInputEl}
|
217 |
maxlength="150"
|
218 |
type="search"
|
|
|
219 |
/>
|
220 |
</div>
|
221 |
<select
|
222 |
bind:value={sortValue}
|
223 |
on:change={sortTools}
|
224 |
class="rounded-lg border border-gray-300 bg-gray-50 px-2 py-1 text-sm text-gray-900 focus:border-blue-700 focus:ring-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"
|
|
|
225 |
>
|
226 |
<option value={SortKey.TRENDING}>{SortKey.TRENDING}</option>
|
227 |
<option value={SortKey.POPULAR}>{SortKey.POPULAR}</option>
|
|
|
111 |
href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/357"
|
112 |
class="ml-auto dark:text-gray-400 dark:hover:text-gray-300"
|
113 |
target="_blank"
|
114 |
+
aria-label="Hub discussion about tools"
|
115 |
>
|
116 |
<CarbonHelpFilled />
|
117 |
</a>
|
118 |
{/if}
|
119 |
</div>
|
120 |
+
<h2 class="text-gray-500">Popular tools made by the community</h2>
|
121 |
+
<h3 class="mt-2 w-fit text-purple-700 dark:text-purple-300">
|
122 |
This feature is <span
|
123 |
class="rounded-lg bg-purple-100 px-2 py-1 font-semibold dark:bg-purple-800/50"
|
124 |
>experimental</span
|
|
|
128 |
href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/569"
|
129 |
target="_blank">sharing your feedback with us!</a
|
130 |
>
|
131 |
+
</h3>
|
132 |
<div class="ml-auto mt-6 flex justify-between gap-2 max-sm:flex-col sm:items-center">
|
133 |
{#if data.user?.isAdmin}
|
134 |
<label class="mr-auto flex items-center gap-1 text-red-500" title="Admin only feature">
|
|
|
217 |
bind:this={filterInputEl}
|
218 |
maxlength="150"
|
219 |
type="search"
|
220 |
+
aria-label="Filter tools by name"
|
221 |
/>
|
222 |
</div>
|
223 |
<select
|
224 |
bind:value={sortValue}
|
225 |
on:change={sortTools}
|
226 |
class="rounded-lg border border-gray-300 bg-gray-50 px-2 py-1 text-sm text-gray-900 focus:border-blue-700 focus:ring-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"
|
227 |
+
aria-label="Sort tools"
|
228 |
>
|
229 |
<option value={SortKey.TRENDING}>{SortKey.TRENDING}</option>
|
230 |
<option value={SortKey.POPULAR}>{SortKey.POPULAR}</option>
|