Add visually hidden label instead of implying from icon
</a>
<form role="search">
- <input type="search" name="query">
+ <label for="query" class="visually-hidden">Search this site</label>
+ <input type="search" name="query" id="query">
<button>
<svg role="img" aria-labelledby="search-icon" width="24" height="24" viewBox="0 0 24 24" fill="none">
- <title id="search-icon">Search this site</title>
+ <title id="search-icon">Search</title>
<circle cx="9" cy="9" r="7" stroke="#000" />
<line x1="14" y1="14" x2="22" y2="22" stroke="#000" stroke-linecap="round" />
</svg>
gap: 4px;
}
+.visually-hidden {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ border: 0;
+ margin: -1px;
+ clip: rect(0 0 0 0);
+ overflow: hidden;
+}
+
input {
min-block-size: 20px;
font-size: 16px;