1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Add aria-required, autocomplete attributes to forms

- We don't want autocomplete on the webmention form, since users should
  not be entering a link multiple times.
- Not all browsers support the "required" HTML5 attribute, so add the
  "aria-required" HTML attribute too.
This commit is contained in:
Rohan Kumar 2022-07-08 14:32:25 -07:00
parent 297ad1e5cb
commit 4d3b628fb3
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@
<meta itemprop="urlTemplate" content="{{ $action }}?q={q}" />
</label>
<div><!--We need the extra divs to serve as pseudo-table-cells.-->
<input itemprop="query-input" id="search" type="search" required="" name="q" />
<input itemprop="query-input" id="search" type="search" required="" aria-required="true" autocomplete="on" name="q" />
<div><input type="submit" value="search" /></div>
</div>
</form>

View file

@ -8,7 +8,7 @@
<input type="hidden" name="target" value="{{ .Site.Params.canonicalBaseURL }}{{ $canonicalRelPermalink }}" />
<label for="menchie">URL of page linking here</label>
<div><!--We need the extra divs to serve as pseudo-table-cells.-->
<input id="menchie" type="url" required="" name="source" />
<input id="menchie" type="url" autocomplete="off" required="" aria-required="true" name="source" /><!--disable autocomplete bc it's a unique URL.-->
<div><input type="submit" value="submit" /></div>
</div>
</form>