Skip to content

Commit

Permalink
Added instructions to the form example
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltan-dulac committed Jan 29, 2025
1 parent d3d06b3 commit b2ea86a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions content/body/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"label": "Insert fieldset and legend",
"highlight": "\\s*<[\/]?fieldset> ||| \\s*<legend[\\s\\S]*>[\\s\\S]*</legend>",
"notes": "The <strong>legend</strong> tag must be a direct child of the <strong>fieldset</strong> tag in order for it to work across screen readers."
},
{
"label": "Connect instructions to fieldset with aria-describedby",
"highlight": "aria-describedby",
"notes": "Most screen readers will read the instructions when the user first accesses any of the form elements via keyboard."
}
]
}
Expand Down Expand Up @@ -170,6 +175,11 @@
"This ensures that what the aria-labelledby attribute points to acts as a legend for the fieldset.",
"Unlike a HTML example, the label does not have to be a direct child to the group element (which acts as a fieldset)."
]
},
{
"label": "Connect instructions to the group with aria-describedby",
"highlight": "aria-describedby",
"notes": "Most screen readers will read the instructions when the user first accesses any of the form elements via keyboard."
}
]
}
Expand Down

0 comments on commit b2ea86a

Please sign in to comment.