Semantic Structure and Navigation (with WCAG 2.2 updates) Flashcards

1
Q

What are the types of landmarks in ARIA?

A

banner
navigation
main
contentinfo
complementary
form
search
region

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What HTML tag maps to banner?

A

header

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Should you have more than one banner role per page?

A

No, you should only have one banner role per page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the HTML <nav> tag map to in ARIA?

A

navigation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can you have more then one <nav> tag per page?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How many main landmarks should be used on a page?

A

Just one, it denotes the main section of the page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the ARIA role of contentinfo map to for an HTML tag?

A

<footer></footer>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is complementary landmark used for?

A

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/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a good way to create more then one complementary landmark on a page?

A

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/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What a good way to use form landmarks?

A

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>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True or False: The <form> landmark is exposed by default.

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How should you create a search landmark?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is region landmark?

A

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”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the proper way to use a region landmark?

A

<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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When should you use link vs a button?

A
  • Buttons trigger programmable actions. You will generally need to use JavaScript to make a button do something.
  • Links take you places.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the best way to code a navigation for accessibility?

A

<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