Skip to content

Commit

Permalink
docs: consistent colons in input labels
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvasilchuk authored Oct 31, 2023
1 parent 47b7a2f commit 3a4f4d5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/guide/best-practices/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Notice how you can include `autocomplete='on'` on the form element and it will a
Provide labels to describe the purpose of all form control; linking `for` and `id`:

```vue-html
<label for="name">Name</label>
<label for="name">Name: </label>
<input type="text" name="name" id="name" v-model="name" />
```

Expand Down Expand Up @@ -191,7 +191,7 @@ Explicitly setting the labels with a matching id is better supported by assistiv
You can also give the input an accessible name with [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).

```vue-html
<label for="name">Name</label>
<label for="name">Name: </label>
<input
type="text"
name="name"
Expand Down Expand Up @@ -220,7 +220,7 @@ Using [`aria-labelledby`](https://developer.mozilla.org/en-US/docs/Web/Accessibi
>
<h1 id="billing">Billing</h1>
<div class="form-item">
<label for="name">Name:</label>
<label for="name">Name: </label>
<input
type="text"
name="name"
Expand Down Expand Up @@ -250,7 +250,7 @@ Using [`aria-labelledby`](https://developer.mozilla.org/en-US/docs/Web/Accessibi
>
<h1 id="billing">Billing</h1>
<div class="form-item">
<label for="name">Full Name:</label>
<label for="name">Full Name: </label>
<input
type="text"
name="name"
Expand Down Expand Up @@ -330,7 +330,7 @@ You can provide additional instructions and bind multiple ids inside an [`aria-l
```vue-html
<fieldset>
<legend>Using aria-labelledby</legend>
<label id="date-label" for="date">Current Date:</label>
<label id="date-label" for="date">Current Date: </label>
<input
type="date"
name="date"
Expand All @@ -346,7 +346,7 @@ Alternatively, you can attach the instructions to the input with [`aria-describe
```vue-html
<fieldset>
<legend>Using aria-describedby</legend>
<label id="dob" for="dob">Date of Birth:</label>
<label id="dob" for="dob">Date of Birth: </label>
<input type="date" name="dob" id="dob" aria-describedby="dob-instructions" />
<p id="dob-instructions">MM/DD/YYYY</p>
</fieldset>
Expand Down Expand Up @@ -426,7 +426,7 @@ You can use this technique to create functional images.

```vue-html
<form role="search">
<label for="search" class="hidden-visually">Search: </label>
<label for="search" class="hidden-visually">Search:</label>
<input type="text" name="search" id="search" v-model="search" />
<input
type="image"
Expand All @@ -441,7 +441,7 @@ You can use this technique to create functional images.

```vue-html
<form role="search">
<label for="searchIcon" class="hidden-visually">Search: </label>
<label for="searchIcon" class="hidden-visually">Search:</label>
<input type="text" name="searchIcon" id="searchIcon" v-model="searchIcon" />
<button type="submit">
<i class="fas fa-search" aria-hidden="true"></i>
Expand Down

0 comments on commit 3a4f4d5

Please sign in to comment.