Coding for Accessibility Flashcards

1
Q

What aria property sets a form field as required?

A

aria-required

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

What is the HTML tag equivalent of landmark role=banner?

A

<header>

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

What is the HTML tag equivalent of landmark role=complementary?

A

<aside>

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

What is the HTML tag equivalent of landmark role=contentinfo?

A

<footer>

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

What is the HTML tag equivalent of landmark role=navigation?

A

<nav>

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

What are the 8 landmark WAI-ARIA roles?

A
  1. banner
  2. complementary
  3. contentinfo
  4. form
  5. main
  6. navigation
  7. region
  8. search
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the HTML tag equivalent of landmark role=region?

A

<section aria-label>

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

Which semantic element displays a hand pointer on hover state?

A

Link

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

Is touch functionality covered by support for click events or keyboard events?

A

Click events

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

What is the minimum recommended touch target size?

A

44 x 44 px

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

What is the effect of role=presentation on screen readers?

A

It removes the default semantics and implicit ARIA from the accessibility tree. For example, and <h2> will be treated as a <div>

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

Is keeping headings in hierarchal order a MUST or a SHOULD for AA conformance.

A

SHOULD

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

What aria attribute tracks paginated views for screen readers?

A

aria-current

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

What is the main thing to add when coding an accessible iframe (MUST exist for AA conformance)

A

a non-element title attribute
Example:

<iframe 
  title="Video: Specify the Language" 
  width="560" height="315" 
  src="https://www.youtube.com/embed/qyjDrUV_el8" 
  frameborder="0" allowfullscreen>
</iframe>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What would be considered the best practice when choosing the title attribute for an iframe?

A

It should match the <title> element of the enclosed document.

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

How do the headings of an iframe relate to the headings of the main page?

A

The iframe headings are part of the main page accessibility tree and SHOULD be designed to fit into the main page hierarchy if possible.

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

What aria attribute should be added to an iframe without meaningful content

A

aria-hidden

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

What 2 properties will disable pinch-to-zoom when set on the meta viewport element?

A

user-scalable=no and maximum-scale=1.0.

19
Q

What attributes will override the alt attribute text on an img element

A

aria-label and aria-labelledby

20
Q

How should an image be coded in order to be ignored by a screen reader?

A

Have an empty alt attribute and no aria-label or aria-labelledby attribute

21
Q

What is the difference between role=application and role=presentation?

A

Role=application causes the element and all of it’s descendants are part of an application that doesn’t conform to default ARIA specifications and where the web developer has implicated their own keyboard shortcuts.

Role=presentation removes all the default semantics and implicit ARIA from the accessibility tree and leaves only content available to screen readers.

22
Q

What is the difference between role=alert and role=alertdialog?

A

Role=alert announces but doesn’t require user interaction or focus.

Role=alertdialog requires user interation and therefore also requires focus.

23
Q

What are 2 other ways to hide images from screen readers aside from empty alt text?

A
  1. Role=presentation
  2. Implement as CSS backgrounds
24
Q

What is the max number of characters that SHOULD be used in alt text?

25
What SHOULD be included and what MUST be included when coding informative icon fonts without visible redundant text?
1. Role=img (SHOULD) 2. aria-label or aria-labelledby (MUST) | Use aria-hidden if there is visible redundant text
26
What tags should NOT be used to embed an SVG?
1. `` 2. `