文章目录
-
- 1. Overall duty of all parties (for details please refer to the checklist)
- 2. Checklist
-
- 2.1 Checkpoint: Language
- 2.2 Checkpoint: Page Title
- 2.3 Checkpoint: Landmark
- 2.4 Checkpoint: Skip links
- 2.5 Checkpoint: Breadcrumb
- 2.6 Checkpoint: Heading
- 2.7 Checkpoint: Image
- 2.8 Checkpoint: Button
- 2.9 Checkpoint: Link
- 2.10 Checkpoint: List
- 2.11 Checkpoint: Carousel
- 2.12 Checkpoint: Tab Index
- 2.13 Checkpoint: Navigation
- 2.14 Checkpoint: Accordion
- 2.15 Checkpoint: Modal/Popup
- 2.16 Checkpoint: Outline
- 2.17 Checkpoint: Table
- 2.18 Checkpoint: Form
- 2.19 Checkpoint: Quote
- 2.20 Checkpoint: Reading order
- 2.21 Checkpoint: Unique Element ID
- 2.22 Checkpoint: Iframe
- 2.23 Checkpoint: Color contrast
- 2.24 Checkpoint: Select
By Joyce, Frank and Shirley
1. Overall duty of all parties (for details please refer to the checklist)
1.1 Role: FE
Implement the correct HTML and attributes, for dynamic parts, use a placeholder to make BE aware of the necessity of creating CMS fields or apply translations.
Use “#BE” as the placeholder text whenever the accessibility related content is dynamic:
image alt text e.g. <img src="xxx.png" alt="#BE">
aria-label e.g. <a href="xxx" aria-label="#BE">Learn More</a>
id and aria-controls e.g.
<h3>
<button aria-controls="#BE1" id="#BE2" aria-expanded="true" class="Accordion-trigger">
<span class="Accordion-title">
Personal Information
<span class="Accordion-icon"></span>
</span>
</button>
</h3>
<div id="#BE1" role="region" aria-labelledby="#BE2" class="Accordion-panel">
The placeholder can also be used in comments to make a more detailed explanation:
e.g.
<!-- #BE These ids should be dynamically populated, use index or CMS node id? -->
A Jira ticket can be created to track integration issues between FE and BE
Never hardcode accessibility-related text without BE placeholder, otherwise, they will likely be neglected.
1.2 Role: BE
Once BE receive HTML from FE, search for all BE placeholders “#BE”, replace them with dynamic logic.
for any CMS fields, make CE aware of the necessity of populating the content. There should be something like a CMS manual to list all accessibility-related CMS fields to be provided to the CE.
others things to check (details can be found in the following checklist) :
headings (h1, h2, h3…) may need to be configurable in case they are in the flexible modules
external links can be configured correctly
when a list (ul or ol) contains only one item, it should be changed to div
the page title is dynamic, iframe titles are editable
1.3 Role: CE
CE should understand that accessibility-related content is usually not visible, but is as important as regular copy deck, hence we should actively chase the front office/client if it’s missing.
Before the dev work, CE should find out the aria-labels and alt texts which are needed from the design and ask the creative team to provide.
1.4 Role: QA
In order to conduct a complete test, QA needs to understand the knowledge of web accessibility to the same level as developers and then use Web Accessibility Checklist (Dev/Content/Design) and the following checklist to check the website. QA should do a search of the code for stray #BE etc tags before sending the pages to ADA for review.
2. Checklist
2.1 Checkpoint: Language
Solution
Make sure lang=“xx-xx” is specified with the “Html” tag
For any content within the page that are not in the page-wise language, it needs to be explicitly marked.
Example:
<html lang="en-US">
...
<p>Hello World</p>
<span title="Spanish">
<a lang="es" href="qa-html-language-declarations.es">Español</a>
</span>
...
<html>
Reference:
https://www.w3.org/International/questions/qa-html-language-declarations
Visual Examples
Language selection items should have corresponding lang attribute:
Who should care
FE: use placeholder to tell BE if the language list needs to be dynamically populated.
BE: if the content in a foreign language is populated by BE logic, such as a dynamic language selection dropdown, make sure the lang attribute is specified for each language.
CE: For any content within the page that are not in the page-wise language, it needs to be explicitly marked with a lang attribute.
2.2 Checkpoint: Page Title
Solution
<title>Always include meaningful and unique page title</title>
Best practice: the content in the title tag should match the content in the H1 tag.
Visual Examples
Who should care
FE: include page title as example in the HTML
BE: provide ways to input page title in CMS
CE: Provide a meaningful and unique title for each web page to enable users to identify the web page content.
2.3 Checkpoint: Landmark
Solution
-
Make sure all key landmarks exist:
-
for page header, it should not be nested in other landmarks like main
<nav>
- can have multiple on a single page<main>
- can have one on a single page
<role="contentinfo">
- can have one on a single page(footer can represent the conteninfo role when its context is the body element.)
- for footer, as the tag is not supported in legacy browsers/ screen readers, we define both the contentinfo role and the tag as:
-
<footer role="contentinfo">...</footer>
https://www.w3.org/TR/wai-aria-practices/examples/landmarks/contentinfo.html
- For landmark which appears multiple times on a page, use aria-label to mark them
for example, header nav, footer nav, and breadcrumbs
<nav aria-label="breadcrumb" >
<nav aria-label="in-page navigation">
- When using the
<br>
tag for layout purposes (such as in a header), adding aria-hidden attribute is necessary. otherwise the screen reader will read it.<br aria-hidden="true">
Visual Examples
header landmark, should not be nested in main:
header landmark, should not be nested in main:
footer landmark <footer role="contentinfo">...</footer>
2.4 Checkpoint: Skip links
Solution
-
Skip links should be added for keyboard users to jump to main content and footer
-
They should be put at the beginning of the page, usually right after the opening
<body>
tag, and before navigation. -
They should be hidden by default (screen reader only style, not display: none) and display while focused through the keyboard tab key.
-
The skip link target should not be set font-size: 0; otherwise, the focus will not move on the target. (If the font size of HTML element has been set).
-
According to the TC-92 solution, the content of the skip link content can be reduced to avoid the situation where the screen reader is tuned to the anchor position to repeatedly read the content.
-
The wrapper element should be adding the attribute tabindex = “-1”, otherwise, the screen reader can’t read out the target’s value when the IOS environment.
Reason: This is caused by a bug in Android that stops the focus event from being triggered. Please refer here for details
https://www.nomensa.com/blog/2004/what-are-skip-links
Visual Examples
<body>
<div class="skip-links-nav">
<a class="l-offscreen" href="#kp-main">
Skip to page main content
</a>
<a class="l-offscreen" href="#kp-footer">
Skip to page footer
</a>
</div>
<!-- header, navigation, etc. go here -->
<main class="main-container">
<a class="l-offscreen" id="kp-main" tabindex="-1">
Main
</a>
</main>
<footer class="footer" role="contentinfo">
<a class="l-offscreen" id="kp-footer" tabindex="-1">
Footer
</a>
</footer>
</body>
.l-offscreen {
opacity: 0;
position: absolute;
left: -9999px;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";