ARIA Flashcards

1
Q

What does ARIA stand for?

A

“Accessible Rich Internet Applications”

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

The first rule of ARIA use?

A

If you can use a native HTML element or attribute with the semantics and behavior you require already built in, USE THAT instead of re-purposing an element and adding an ARIA role.

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

The second rule of ARIA use?

A

Do not change native semantics unless you really. have to (ex: do not do h2, do div/h2> to create a heading that is also a tab).

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

The third rule of ARIA use?

A

All interactive ARIA controls must be usable with the keyboard. (ex: if using role=button the element must be able to receive focus and user must be able to activate the action via keyboard)

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

The fourth rule of ARIA use?

A

Do not use role=”presentation” or aria-hidden=”true” on a focusable element. It may result in users being able to focus on ‘nothing’.

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

The fifth rule of ARIA use?

A

All interactive elements must have an accessible name.

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

What does adding a role do to the native semantics?

A

Adding ARIA roles overrides the native role semantics.

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

What does adding a role NOT do?

A

Adding an ARIA role will nto make an element look or act differently for people NOT using assistive technology. It will not change the behaviors, states and properties of the host element.

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

What happens when you use role=presentation / role=none

A

This role removes the semantics from the element that it is on. It becomes a node in the DOM tree with no semantic meaning.

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

What is the behavior of children inside tags that have role set to presentation or none?

A

Required elements will also have their semantics removed (like tr, td inside a table with role=none).
Non-requirement children nested inside the element keep their semantics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
T/F: This is the correct way to implement and label a background image:
<div>
<span class="background-image"> </span>
[all the rest of my content]
</div>
A

True- do not put a CSS background image inside a div that contains content- better to use an empty span and an aria-label with role=image.

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

T/F: This is the correct way to implement and label a background image:

<div>
[all the rest of my content]
</div>

A

False- do not put a CSS background image inside a div that contains content- better to use an empty span and an aria-label with role=image.

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

What’s wrong with the following tag?

Press Me

A

Setting the role is redundant since the element is already a button!

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