Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app-search): add arial label and kbd identifiers to search button #640

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion theme/components/AppSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ const onClick = () => element.value.querySelector('button').click()
<div class="relative pointer-events-auto group" @click="onClick">
<button
type="button"
aria-label="Search"
class="u-text-gray-500 hover:u-text-gray-700 lg:u-ring-gray-100 lg:group-hover:u-ring-gray-300 flex w-full items-center text-sm lg:rounded-md lg:py-1.5 lg:pl-2 lg:pr-3 lg:shadow-sm lg:ring-1"
>
<Icon name="heroicons-outline:search" class="flex-none w-6 h-6 lg:mr-2 lg:h-4 lg:w-4" />
<span class="hidden text-xs font-medium lg:block">Search</span>
<span class="flex-none hidden pl-3 ml-auto text-xs font-semibold u-text-gray-400 lg:block">⌘K</span>
<span class="flex-none hidden pl-3 ml-auto text-xs font-semibold u-text-gray-400 lg:block">
<kbd>⌘</kbd>
<kbd>K</kbd>
</span>
</button>
</div>
</template>