Skip to content

Commit

Permalink
fix(a11y): increase touch target size of search icons
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Apr 15, 2023
1 parent db32a26 commit 4449867
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/client/theme-default/components/VPLocalSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ useEventListener('popstate', (event) => {

<div class="shell">
<div class="search-bar" @pointerup="onSearchBarClick($event)">
<svg class="search-icon" width="16" height="16" viewBox="0 0 24 24">
<svg class="search-icon" width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
<g
fill="none"
stroke="currentColor"
Expand All @@ -331,7 +331,7 @@ useEventListener('popstate', (event) => {
:title="$t('modal.backButtonTitle')"
@click="$emit('close')"
>
<svg width="16" height="16" viewBox="0 0 24 24">
<svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
<path
fill="none"
stroke="currentColor"
Expand All @@ -358,7 +358,7 @@ useEventListener('popstate', (event) => {
:title="$t('modal.displayDetails')"
@click="showDetailedList = !showDetailedList"
>
<svg width="16" height="16" viewBox="0 0 24 24">
<svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
<path
fill="none"
stroke="currentColor"
Expand All @@ -375,7 +375,7 @@ useEventListener('popstate', (event) => {
:title="$t('modal.resetButtonTitle')"
@click="filterText = ''"
>
<svg width="16" height="16" viewBox="0 0 24 24">
<svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
<path
fill="none"
stroke="currentColor"
Expand Down Expand Up @@ -407,7 +407,7 @@ useEventListener('popstate', (event) => {
<span class="title-icon">#</span>
<span v-for="(t, index) in p.titles" :key="index" class="title">
<span class="text" v-html="t" />
<svg width="16" height="16" viewBox="0 0 24 24">
<svg width="20" height="20" viewBox="0 0 24 24">
<path
fill="none"
stroke="currentColor"
Expand Down Expand Up @@ -571,6 +571,13 @@ useEventListener('popstate', (event) => {
.search-actions {
display: flex;
gap: 4px;
}
@media (any-pointer: coarse) {
.search-actions {
gap: 8px;
}
}
@media (min-width: 769px) {
Expand All @@ -580,7 +587,7 @@ useEventListener('popstate', (event) => {
}
.search-actions button {
padding: 8px 6px;
padding: 8px;
}
.search-actions button:hover,
Expand Down Expand Up @@ -620,6 +627,7 @@ useEventListener('popstate', (event) => {
gap: 6px;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
}
.result {
Expand Down

0 comments on commit 4449867

Please sign in to comment.