Semantic Structure and Navigation (with WCAG 2.2 updates) Flashcards
(112 cards)
What are the types of landmarks in ARIA?
banner
navigation
main
contentinfo
complementary
form
search
region
What HTML tag maps to banner?
header
Should you have more than one banner role per page?
No, you should only have one banner role per page.
What does the HTML <nav> tag map to in ARIA?
navigation
Can you have more then one <nav> tag per page?
Yes, you can. It is recommended to provide an arialabel or arialabelledby to provide an accessible name for multiple navs on page.
Examples:
<nav>
<!-- navigation links -->
</nav>
<nav>
<!-- navigation links -->
</nav>
<nav>
<h2>Categories</h2>
<!-- list of content categories -->
</nav>
https://practical-accessibility.today/chapters/landmark-regions/
How many main landmarks should be used on a page?
Just one, it denotes the main section of the page
What does the ARIA role of contentinfo map to for an HTML tag?
<footer></footer>
What is complementary landmark used for?
It contains information that is complementary to the main content, such as side bar with additional links on a blog posts.
Use the <aside> HTML tag
https://practical-accessibility.today/chapters/landmark-regions/
What is a good way to create more then one complementary landmark on a page?
You may create more than one complementary landmark on a page. Similar to the navigation landmark, if you do create more than one complementary landmark, assign each of them an appropriate name that identifies its purpose. When a heading is present, you can expose that heading as the name for the <aside> using the aria-labelledby attribute:
<aside>
<h2>Title for this complementary area</h2>
This is secondary information related to the `main` content of the page.
</aside>
<aside>
<h2>Title for another complementary area</h2>
This is another secondary information area.
</aside>
https://practical-accessibility.today/chapters/landmark-regions/
What a good way to use form landmarks?
Every form should ideally have a visible label that describes what the form is for. This label may then be used to provide an accessible name for the form using aria-labelledby:\
<form>
<h2>Sign up</h2>
<!-- form controls here -->
</form>
True or False: The <form> landmark is exposed by default.
The <form> element is not exposed as a form landmark by default. It is only exposed as a form landmark when it is given an accessible name. Not all forms need to be exposed as landmarks.
How should you create a search landmark?
Use the HTML <search> element</search>
<search>
<form>
<label>Find an article</label>
<input></input>
<button>Go!</button>
</form>
</search>
<search>
<label>
Find and filter your query
<input></input>
</label>
<section>
<h3>Results found:</h3>
<ul>
<li>
...
</li>
...
</ul>
<output><!-- When no results are found, render the no results message here --></output>
</section>
</search>
https://practical-accessibility.today/chapters/landmark-regions/#the-search-landmark
What is region landmark?
A region landmark is defined as “a perceivable section containing content that is relevant to a specific purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page.
https://practical-accessibility.today/chapters/landmark-regions/#the-generic-region”
What is the proper way to use a region landmark?
<section>
<h2>Editor</h2>
..
</section>
or
<!-- this div with an explicit region role is exposed as a landmark region -->
<div>
<h2>Editor</h2>
..
</div>
https://practical-accessibility.today/chapters/landmark-regions/#the-generic-region
When should you use link vs a button?
- Buttons trigger programmable actions. You will generally need to use JavaScript to make a button do something.
- Links take you places.
What is the best way to code a navigation for accessibility?
<nav>
<span>Breadcrumbs</span>
<ol>
<li><a>Home</a></li>
<li><a>Products</a></li>
<li><a>Sustainable Kitchen</a></li>
</ol>
</nav>
By creating the code in this way, we let the user know the nav list is a breadcrumb with the aria-labelledby, the list tells the user how many items are in the list, and finally the user will know that each of these are links.
Use an ordered list when the order of the items is important such as here in the breadcrumb navigation.
https://practical-accessibility.today/chapters/navigation/#labelling-multiple-navigations-on-the-page
Why is semantic HTML markup important for accessibility?
Screen readers rely on the meaning of HTML elements and attributes to convey information to blind users. It is through the semantic markup that browsers are able to parse accessibility cues and information through the accessibility API and pass that information on to users, through assistive technologies, such as screen readers.
In a page title should the company’s come first or last?
a.) Contact Us| Brand Name
b.) Brand Name | Contact Us
Contact Us| Brand Name
Why do you need to add the <html language ="en">?
It tells screen readers and the browser which language the page should be read in.
https://www.w3schools.com/tags/ref_language_codes.asp
If part of the part of the page is in a different language, do you need add a language tag.?
Yes, if you have text you will need to indicate that it is written with a new language by adding a language tag. lang=”es”
What’s the difference between landmarks and headings?
Headings designate sections within the content. Landmarks designate sections of the overall page design and layout.
Should you let users know when you are going to have something open in a new window?
Yes, you can do so by adding an external icon and using the alt text to alert screen reader users that it will open in a new window.
Why should you have a page title for each page?
Screen reader users rely on the title to quickly learn the identity and purpose of the page. If you leave off the title, screen reader users will have to browse the page and infer the identity and purpose from the content, which is highly inconvenient.
Example code:
<!DOCTYPE html>
<html>
<head>
<title>Products and Services</title>
</head>
</html>
If a person types “vegetarian recipes” in a site search, which of the following is the best page title on the search result page?
A. Search
B. Search results
C. Search results for “vegetarian recipes”
D. Vegetarian recipes
C. Search results for “vegetarian recipes”
B.
C.
D.
B.
C.
D.
B.
C.
D.
C.
D.
C.
D.
C.
D.
D.
D.
D.
) at the beginning of the main content says "How to hang ten on a surfboard," the most appropriate for the page from among the options below would be:
A. How to ride a surfboard
B. Surfing tutorial
C. Summers in California
D. How to hang ten on a surfboard
E. An article describing how to hang ten on a surfboard, describing the techniques and circumstances in which it is possible to do it
Understand yourself
) cannot directly follow a heading 2 (), for example. The next subheading under the heading 2 () MUST be a heading 3 ().
A. True
B. False
) MUST be a heading 3 ().
A. True
B. False
- semantics and strip that element of its role of unordered list.
By assigning role="navigation" to the container, rather than to the
- , screen readers will recognize both the navigation role and the unordered list, which allows screen readers to say, "List with three items." If we strip the list of its semantics, the list items will not have their required parent element.
1. First item
2. Second item
3. Third item
Twin mattress $300 $250!
- flow content, according to the MDN Documentation?
A. Yes
B. No
