Skip to content

Commit 52bb640

Browse files
authored
Merge pull request #240 from wpaccessibility/235-fix-code-errors
Fixes issues: #235 and #234
2 parents 0071f9a + 8f9f705 commit 52bb640

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

_posts/2025-08-16-accessible-error-messages-in-forms.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ excerpt: "When you put care into preventing errors and clearly indicating when s
99
date: 2025-08-16
1010
---
1111

12-
When you put care into preventing errors and clearly indicating when something goes wrong, users are much more likely to successfully submit a form.
13-
{: .lead }
12+
## Summary
1413

15-
In this post, we’ll walk step-by-step through how to prevent errors, indicate them clearly, and offer help with error messages in forms for different types of users.
14+
{: .lead }
15+
When you put care into preventing errors and clearly indicating when something goes wrong, users are much more likely to successfully submit a form. In this post, we’ll walk step-by-step through how to prevent errors, indicate them clearly, and offer help with error messages in forms for different types of users.
1616

17-
When designing a form, ask yourself the following questions:
17+
## When designing a form, ask yourself the following questions
1818

1919
* What do I really need to know?
2020
* How will I ask for this information?
@@ -28,7 +28,7 @@ When designing a form, ask yourself the following questions:
2828

2929
No one enjoys filling out forms, and all the help you can give is useful. Keep that goal in mind. You want to learn something from your user, or your user wants to tell you something. Make that process as easy as possible.
3030

31-
## What do I really need to know?
31+
### What do I really need to know?
3232

3333
Handling errors starts with the questions you ask. Some questions are difficult to answer. Is it really essential to know whether someone is male or female? Do you only want to contact them by phone? What if a user's answer to a question isn't an available option, or they don't want to answer a question? They may just give up.
3434

@@ -40,7 +40,7 @@ Be clear about why you need sensitive personal information, such as an identific
4040
In the Netherlands there are strict rules about [when to ask for a citizen service number](https://www.rijksoverheid.nl/onderwerpen/privacy-en-persoonsgegevens/vraag-en-antwoord/welke-organisaties-mogen-mijn-burgerservicenummer-bsn-gebruiken#:~:text=Alle%20overheidsorganisaties%20mogen%20gebruik%20maken%20van%20uw%20burgerservicenummer%20(BSN)). Canada has similar rules governing [how you can request Personally Identifying Information (PII)](https://www.priv.gc.ca/en/privacy-topics/privacy-laws-in-canada/the-personal-information-protection-and-electronic-documents-act-pipeda/p_principle/).
4141

4242

43-
## How will I ask for this information?
43+
### How will I ask for this information?
4444

4545
The input mechanism you use to ask for information has a profound impact on your users. Should you design new custom input fields or use recognizable, familiar patterns? Please don’t reinvent the web for something as essential as form fields. As Heydon Pickering explains in his talk [Get Your Priorities Straight](https://www.youtube.com/watch?v=ediHVy0869c): “Real people aren't looking to be delighted. People want to get the task done and get on with their lives".
4646

@@ -59,7 +59,7 @@ Don't force the user to enter information (like an email address) more than once
5959
{: .callout .info }
6060
This success criterion was added in [WCAG 2.2: 3.3.7 Redundant Entry](https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html).
6161

62-
## What information can I provide in advance to help the user?
62+
### What information can I provide in advance to help the user?
6363

6464
We’ve all been there: you enter a new password, click submit, and *then* you’re told what the password requirements are. You yell at the screen: “Why didn't you tell me that before?”.
6565

@@ -68,19 +68,19 @@ The blog post [*Blind people don't visit my website*](https://www.a11y-collectiv
6868
6969
Don’t make users guess — offer clear help in plain language, at the right moment. Tell users in advance which documents they'll need, and which fields are or aren't required. Add descriptions to fields where necessary.
7070

71-
## How do I show which fields are required?
71+
### How do I show which fields are required?
7272

7373
If you only ask what's really needed, all fields could technically be required — but that’s not always the case. Different types of forms have different needs. For example, if you're creating content in the admin of a website, all of the content fields you might use need to be available; but most of them won't be required.
7474

75-
### What’s the best way to indicate required?
75+
#### What’s the best way to indicate required?
7676

7777
Many websites use indicators like “required”, “optional”, or an asterisk (\*). But which is clearest?
7878

7979
Do user research for your language. For example in Dutch the word "optioneel" (optional) is hard to understand for people with low literacy, and "niet verplicht" (not required) is a better choice. This may be different for your language.
8080

8181
Prefer **“required”** over an asterisk, because an asterisk assumes prior knowledge of the meaning of that icon. If you do use an asterisk, explain its meaning above the form.
8282

83-
### Should I mark required or non-required fields?
83+
#### Should I mark required or non-required fields?
8484

8585
Which is better? Indicate required or non-required fields? It depends. Your choice should be based on the form’s function, your CMS or plugin, and user research.
8686

@@ -93,7 +93,7 @@ For example: "Please complete all fields. If a field is not required, it will be
9393

9494
Whatever you choose, be consistent within the form and across all forms on your website. Inform users above the form how field requirements are indicated.
9595

96-
## When should I check for errors?
96+
### When should I check for errors?
9797

9898
Websites commonly check for errors while typing, after the focus moves out of a field, or after the form is submitted. Which approach is most user-friendly?
9999

@@ -104,7 +104,7 @@ That leaves two options: check after leaving a field, or after submission. These
104104
{: .callout .warning }
105105
HTML5 form validation is not accessible at this moment (in 2025). The W3C summarizes the options in [Validating Input ](https://www.w3.org/WAI/tutorials/forms/validation/). "If your web browser supports HTML5, it will not allow you to submit the form without entering text into the input field. Instead, it will display a message that is generated by the web browser itself". Write custom error messages and provide server side generated error messages. The W3C explains the options in [Validating Input ](https://www.w3.org/WAI/tutorials/forms/validation/).
106106

107-
## How do I indicate that an answer is incomplete or filled out incorrectly?
107+
### How do I indicate that an answer is incomplete or filled out incorrectly?
108108

109109
Use more than color alone to indicate errors. A user with visual impairments or color blindness may not notice a red outline. Color is helpful but always include an error message in text too.
110110

@@ -113,7 +113,7 @@ Use more than color alone to indicate errors. A user with visual impairments or
113113
* Write out the error in text above the form field.
114114
* Add a summary of all errors above the form to help the user quickly see what needs to be corrected.
115115

116-
## What makes a helpful error message?
116+
### What makes a helpful error message?
117117

118118
Messages like “This field is required” or “Invalid value” don’t offer much help. Write clear error messages that explain what’s missing or needs changing.
119119

@@ -124,7 +124,7 @@ Messages like “This field is required” or “Invalid value” don’t offer
124124

125125
This is far more helpful than a generic message.
126126

127-
## How do I confirm a form was successfully submitted?
127+
### How do I confirm a form was successfully submitted?
128128

129129
You click "Send" and… nothing happens. Or you're redirected to the homepage. Was the form actually sent? How do you know?
130130

@@ -134,7 +134,7 @@ Give users clear confirmation that their form has been submitted and what will h
134134
A confirmation text could be:
135135
Thank you for your registration for our workshop "Knitting socks". A confirmation email has been sent to [email protected] with the time and location of the workshop. If you haven't received an email? [Please contact us](#).
136136

137-
## How can I offer help if a user gets stuck?
137+
### How can I offer help if a user gets stuck?
138138

139139
If a user gets stuck filling out a complex form, they need to be able to easily request help.
140140

@@ -146,7 +146,7 @@ Always offer multiple ways to get in touch on your contact page — not everyone
146146
A help text could be:
147147
Do you need help filling out this form or do you have questions? [Please contact us](#).
148148

149-
## Summary
149+
## Conclusion
150150

151151
Help your users as much as possible when filling out a form. Don't ask unnecessary questions just to collect for your statistics. Use standard input form fields wherever possible. Make it clear what is required and how to fill out a field. Use clear, timely error messages. And make sure it’s easy to ask for help when needed.
152152

_posts/2025-08-27-offer-multiple-ways-to-contact-you.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ parent: Blog
88
excerpt: "It’s better to offer multiple ways to get in touch, so people can choose what suits them. Think about your visitors first, not just what’s easiest for you."
99
date: 2025-08-27
1010
---
11-
You want to reach out to customer service, and they say *“Send us a WhatsApp message.”* What if you don’t use WhatsApp, or cannot make a phone call, or use the chatbox?
12-
{: .callout .lead }
13-
By offering multiple contact options, you make sure every customer has a way to connect.
14-
{: .callout .lead }
11+
12+
## Summary
13+
14+
{: .lead }
15+
You want to reach out to customer service, and they say *“Send us a WhatsApp message.”* What if you don’t use WhatsApp, or cannot make a phone call, or use the chatbox? By offering multiple contact options, you make sure every customer has a way to connect.
1516

1617
## Don’t make getting in touch their problem
1718

docs/contribute/github/content-kitchen-sink.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ has_video: true
77

88
# Kitchen sink: options available for content
99

10-
{: .lead }
11-
This page lists the options and code available for creating content in this documentation
10+
This page lists the options and code available for creating content in this documentation.
1211

1312
{: .callout .info }
1413
WordPress.org provides a lot of style guides for documentation: [WordPress Style Guides - highlights](https://make.wordpress.org/docs/style-guide/welcome/highlights/). We value most of all: be [kind and professional](docs/contribute/CODE_OF_CONDUCT.md) in your text and please write the text yourself or make sure the reader knows who you are citing.
@@ -36,17 +35,20 @@ In blog posts the H1 is added by the template: [Add a blog post]({{site.baseurl}
3635

3736
## Summary in a larger text font.
3837

39-
Start the paragraph with the code `{: .lead }`.
38+
Start the paragraph with an H2 named "Summaty, or introduction and the callout {: .lead }`
39+
4040

4141
```markdown
42+
## Summary
43+
4244
{: .lead }
4345
When you put care into preventing errors and clearly indicating when something goes wrong, users are much more likely to successfully submit a form.
4446
```
47+
## Summary
4548

4649
{: .lead }
4750
When you put care into preventing errors and clearly indicating when something goes wrong, users are much more likely to successfully submit a form.
4851

49-
5052
## Text
5153
```markdown
5254
This is a paragraph.

docs/topics/core/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ If you’re updating an existing control, button or link decision logic:
4949
<th>Scenario</th>
5050
<th>Choice</th>
5151
</tr>
52-
</thead>
5352
<tr>
5453
<td>Anchors with null or meaningless HREF values: href=’#’, no href, href=’#something’ where #something does not exist</td>
5554
<td><code>button</code></td>

0 commit comments

Comments
 (0)