-
Notifications
You must be signed in to change notification settings - Fork 6
New design for wpaccessibility.org #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rianrietveld
wants to merge
11
commits into
main
Choose a base branch
from
218-new-design
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e82a04f
adds wa11ypuus
rianrietveld 223781b
remove scss error files
rianrietveld 54d98d6
add fonts
rianrietveld da633fe
initial changes for new layout
rianrietveld 74a3e51
typo
rianrietveld bb91543
new design
rianrietveld 9a62ca8
new layout and update documentation
rianrietveld 2a1bd2a
Merge branch 'main' of github.com:wpaccessibility/wp-a11y-docs into 2…
rianrietveld 70d07e5
new layout
rianrietveld 7eb6b5d
linter
rianrietveld 9bcee70
background color search
rianrietveld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,22 @@ | ||
| <div class="search"> | ||
| <form class="search-input-wrap" role="search" action="{{ site.baseurl }}/search/" method="get"> | ||
| <search class="search"> | ||
| <form class="search-input-wrap" action="{{ site.baseurl }}/search/" method="get"> | ||
| <label for="search-input" class="search-label"> | ||
| <span class="screen-reader-text">Search {{ site.title }}</span> | ||
| <svg viewBox="0 0 24 24" class="search-icon" aria-hidden="true"> | ||
| <use xlink:href="#svg-search"></use> | ||
| </svg> | ||
| </label> | ||
|
|
||
| <input | ||
| type="search" | ||
| id="search-input" | ||
| name="q" | ||
| class="search-input" | ||
| placeholder="Search {{ site.title }}" | ||
| <input | ||
| type="search" | ||
| id="search-input" | ||
| name="q" | ||
| class="search-input" | ||
| autocomplete="off" | ||
| > | ||
|
|
||
| <button type="submit" class="search-submit">Search</button> | ||
| </form> | ||
|
|
||
| <div id="search-results" class="search-results"></div> | ||
| </div> | ||
| </search> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,16 +2,21 @@ | |
| <header class="site-header"> | ||
|
|
||
| <div class="lh-wrapper"> | ||
| <img src="{{site.baseurl}}/assets/images/logo.jpg" alt="Accessibility: Advocate Equal Access"> | ||
| <a href="{{ '/' | relative_url }}" class="site-title lh-tight"> | ||
| {{ site.title}}</a> | ||
| <img src="{{site.baseurl}}/assets/images/logo-wa11ypuu.png" alt="WP Accessibility logo, to homepage"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't personally like having the accessible name of the link have all this information in it. This becomes "WP Accessibility logo, to home page WP Accessibility Knowledge Base", which seems excessive to me. |
||
| {{ site.title }} | ||
| </a> | ||
| </div> | ||
| <button id="menu-button" class="site-button btn-reset" aria-expanded="false"> | ||
| <span>Menu</span> | ||
| <svg viewBox="0 0 24 24" class="icon" aria-hidden="true"> | ||
| <use xlink:href="#svg-menu"></use> | ||
| </svg> | ||
| </button> | ||
|
|
||
| <div class="menu-button-wrapper"> | ||
| <button id="menu-button" class="site-button" aria-expanded="false"> | ||
| <span>Menu</span> | ||
| <svg viewBox="0 0 24 24" class="icon" focusable="false" aria-hidden="true"> | ||
| <use xlink:href="#svg-menu"></use> | ||
| </svg> | ||
| </button> | ||
| <div> | ||
|
|
||
| </header> | ||
|
|
||
| {% include_cached components/site_nav.html %} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ date: 2025-08-16 | |
| --- | ||
|
|
||
| When you put care into preventing errors and clearly indicating when something goes wrong, users are much more likely to successfully submit a form. | ||
| {: .fs-6 .fw-300 } | ||
| {: .lead } | ||
|
|
||
| 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. | ||
|
|
||
|
|
@@ -36,15 +36,15 @@ Only ask for information you truly need in order to process the request. The few | |
|
|
||
| Be clear about why you need sensitive personal information, such as an identification number, race, religion or medical data. Check your local legislation to see if you are allowed to request such private information in an open online form. | ||
|
|
||
| {: .info } | ||
| {: .callout .info } | ||
| 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/). | ||
|
|
||
|
|
||
| ## How will I ask for this information? | ||
|
|
||
| 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". | ||
|
|
||
| {: .example } | ||
| {: .callout .example } | ||
| For example: users recognize radio buttons as circles and checkboxes as squares. They know from experience they can choose one option from the radio buttons and multiple options from the checkboxes. Also, the [keyboard interaction](https://webaim.org/techniques/keyboard/#testing) for radio buttons and checkboxes differs from each other. | ||
|
|
||
| Some field types are better avoided due to poor usability, such as multi-selects. Using date pickers? Check the experience for keyboard or screen reader users. | ||
|
|
@@ -56,7 +56,7 @@ For a deep dive into asking for dates in forms, see the GOV.UK Design System pat | |
|
|
||
| Don't force the user to enter information (like an email address) more than once, or expect them to remember entries entered on previous screens, like in a multistep form. | ||
|
|
||
| {: .info } | ||
| {: .callout .info } | ||
| This success criterion was added in [WCAG 2.2: 3.3.7 Redundant Entry](https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html). | ||
|
|
||
| ## What information can I provide in advance to help the user? | ||
|
|
@@ -88,7 +88,7 @@ One option could be that when most fields are required, mark the *optional* ones | |
|
|
||
| But, keep the way you indicate required/non-required fields consistent with all forms in your site. | ||
|
|
||
| {: .example } | ||
| {: .callout .example } | ||
| For example: "Please complete all fields. If a field is not required, it will be labeled "(Optional)". | ||
|
|
||
| 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. | ||
|
|
@@ -101,7 +101,7 @@ Checking during typing can be confusing. Imagine typing an email address and see | |
|
|
||
| That leaves two options: check after leaving a field, or after submission. These can be combined. For certain fields, like dates that must be in the future, immediate checking is helpful. But checking after submission is always necessary. | ||
|
|
||
| {: .warning } | ||
| {: .callout .warning } | ||
| 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/). | ||
|
|
||
| ## How do I indicate that an answer is incomplete or filled out incorrectly? | ||
|
|
@@ -117,7 +117,7 @@ Use more than color alone to indicate errors. A user with visual impairments or | |
|
|
||
| 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. | ||
|
|
||
| {: .example } | ||
| {: .callout .example } | ||
| “Enter your first name” | ||
| “Your chosen password is too short. It must be at least 12 characters long.” | ||
| “The expiration date must be in the future.” | ||
|
|
@@ -130,7 +130,7 @@ You click "Send" and… nothing happens. Or you're redirected to the homepage. W | |
|
|
||
| Give users clear confirmation that their form has been submitted and what will happen next. You can also include this messsage in a confirmation email. | ||
|
|
||
| {: .example } | ||
| {: .callout .example } | ||
| A confirmation text could be: | ||
| 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](#). | ||
|
|
||
|
|
@@ -142,7 +142,7 @@ Don't hide contact details. They shouldn't be buried at the bottom of the form, | |
|
|
||
| Always offer multiple ways to get in touch on your contact page — not everyone can make a phone call. | ||
|
|
||
| {: .example } | ||
| {: .callout .example } | ||
| A help text could be: | ||
| Do you need help filling out this form or do you have questions? [Please contact us](#). | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this has sufficient compatibility? The
searchelement has only been supported on Safari since version 17, so older Macs & iOS devices may not get the landmark role from the element. Other browsers are on similar timelines, but Safari is unique in that devices that can't be updated to more recent OS also can't update their browsers.