mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 13:19:04 +08:00
a11y: label for searbox #307
This commit is contained in:
parent
669323f00c
commit
47fb99e08d
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "البحث"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "...البحث"
|
other = "...البحث"
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Suchen"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Suchen..."
|
other = "Suchen..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Search"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Search..."
|
other = "Search..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Buscar"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Buscar..."
|
other = "Buscar..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Rechercher"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Rechercher..."
|
other = "Rechercher..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "खोजे"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "खोजे..."
|
other = "खोजे..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Telusuri"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Telusuri..."
|
other = "Telusuri..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Cerca"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Cerca..."
|
other = "Cerca..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "検索"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "検索..."
|
other = "検索..."
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
[Search]
|
||||||
|
other = "검색"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "검색어를 입력하세요."
|
other = "검색어를 입력하세요"
|
||||||
|
|
||||||
[Clear-History]
|
[Clear-History]
|
||||||
other = "방문 기록 삭제"
|
other = "방문 기록 삭제"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Zoeken"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Zoeken..."
|
other = "Zoeken..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Searrrch"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Searrrch..."
|
other = "Searrrch..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Szukaj"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Szukaj..."
|
other = "Szukaj..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Procurar"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Procurar..."
|
other = "Procurar..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Поиск"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Поиск..."
|
other = "Поиск..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Ara"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Ara..."
|
other = "Ara..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "Tìm kiếm"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "Tìm kiếm..."
|
other = "Tìm kiếm..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "搜索"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "搜索..."
|
other = "搜索..."
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[Search]
|
||||||
|
other = "搜尋"
|
||||||
|
|
||||||
[Search-placeholder]
|
[Search-placeholder]
|
||||||
other = "搜尋..."
|
other = "搜尋..."
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<div class="searchbox default-animation">
|
<div class="searchbox default-animation">
|
||||||
<label for="search-by"><i class="fas fa-search"></i></label>
|
<label class="a11y-only" for="search-by">{{ T "Language" }}</label>
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
<input data-search-input id="search-by" type="search" placeholder="{{ T "Search-placeholder" }}">
|
<input data-search-input id="search-by" type="search" placeholder="{{ T "Search-placeholder" }}">
|
||||||
<span data-search-clear=""><i class="fas fa-times"></i></span>
|
<span data-search-clear=""><i class="fas fa-times"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -86,11 +86,11 @@ th {
|
|||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchbox label {
|
.searchbox > i {
|
||||||
color: rgba( 255, 255, 255, .8 );
|
color: rgba( 255, 255, 255, .8 );
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
top: 3px;
|
top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchbox span {
|
.searchbox span {
|
||||||
@ -1417,3 +1417,41 @@ input[type="search"]::-webkit-search-results-decoration { display: none; }
|
|||||||
width: 100px;
|
width: 100px;
|
||||||
top: -9999px;
|
top: -9999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.a11y-only {
|
||||||
|
/* idea taken from https://www.filamentgroup.com/lab/a11y-form-labels.html */
|
||||||
|
position: absolute;
|
||||||
|
height: 1px;
|
||||||
|
width: 1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(1px 1px 1px 1px);
|
||||||
|
clip: rect(1px,1px,1px,1px);
|
||||||
|
transform: translateY(-100%);
|
||||||
|
transition: transform .5s cubic-bezier(.18,.89,.32,1.28);
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* filament style for making action visible on focus - not adepted yet
|
||||||
|
.a11y-only:focus {
|
||||||
|
position: fixed;
|
||||||
|
height: auto;
|
||||||
|
overflow: visible;
|
||||||
|
clip: auto;
|
||||||
|
white-space: normal;
|
||||||
|
margin: 0 0 0 -100px;
|
||||||
|
top: -.3em;
|
||||||
|
left: 50%;
|
||||||
|
text-align: center;
|
||||||
|
width: 200px;
|
||||||
|
background: #fff;
|
||||||
|
color: #368512;
|
||||||
|
padding: .8em 0 .7em;
|
||||||
|
font-size: 16px;
|
||||||
|
z-index: 5000;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom-right-radius: 8px;
|
||||||
|
border-bottom-left-radius: 8px;
|
||||||
|
outline: 0;
|
||||||
|
transform: translateY(0%);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user