Update the <title>
element when the page reloads to display an error or confirmation message
When the form sends an error or confirmation message after reloading the page, the <title>
element should always be updated to show that information.
For example, if submission is successful:
<title>Confirmation - Contact | [Site name]</title>
If there is an error:
<title>Error - Contact | [Site name]</title>
Tip
It is recommended to include this information at the beginning of the <title>
element.
Note
In some situations, the title does not need to be updated because the title displayed after submission is already obvious.
For example:
- A login which goes directly to the “User Profile”.
- A button which says “Next step” as part of a multi page form.
- A contact page that sends a preview page.
Find out more
- Associated accessibility guideline for HTML, CSS and JavaScript: 2.1. Provide a descriptive
<title>
element on each page.
1 comment
-
dsad