Skip to content

Commit

Permalink
Update remote content FOLIO-3311
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrossleyau committed Feb 15, 2024
1 parent c9763a3 commit 38701dd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,32 +90,32 @@ Form controls require associated labels so that AT can convey the purpose of a t

Typical labeling of form elements is as follows (explicit labeling) our form controls set these up under the hood:
```
<!-- general html controls -->
{/* general html controls */}
<label for="inputid">username</label>
<input type="text" id="inputid" />
<!-- stripes-components controls -->
{/* stripes-components controls */}
<TextField label="username" />
```

Given this, a screen reader will announce 'username edit blank' when the user tabs to the field. Without the `<label>`, it simply announces 'edit blank'.

If visible labels are inadequate, `aria-label` can be used:
```
<!-- general html controls -->
{/* general html controls */}
<input type="text" aria-label="username" id="inputid" />
<!-- stripes-components controls -->
{/* stripes-components controls */}
<TextField aria-label="username" />
```
If the label is visible elsewhere in the page, its element can be associated with the input via `aria-labelledby`:
```
<!-- general html controls -->
{/* general html controls */}
<div id="columnlabel">starting date</div>
...
<input type="text" aria-labelledby="columnlabel" />
<!-- stripes-components controls -->
{/* stripes-components controls */}
<TextField aria-labelledby="columnlabel" />
```

Expand Down

0 comments on commit 38701dd

Please sign in to comment.