1.6 Creat Accessible Singe Page Apps (SPA) Flashcards

1
Q

How is an SPA different from regular pages from a SRs POV?

A

Content changes without page load events.

They use AJAX calls to change and add content to the page.

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

What are two ways to let SR users know new content has been added via user interaction triggered AJAX (when there is no screen load event?)

A

Move focus to new content

Use aria-live to announce new content but do not move focus

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

What is a good way to inform SR users of new content added via non-user interaction triggered AJAX (when they pushed no button and there is no screen load event?)

A

Make sure the new content appears after their current location in the DOM.

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

What are the six best practices of accessibility with SPAs?

A
Update the page title (document.title)
Notify the user of page changes
Notify the user of updates inside the page (ARIA)
Move focus
Use HTML 5 semantics
Manage browser history (History API)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When and how should you change the page title for an SPA?

A

Using Javascript, as the URL is changed

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

How can we notify the user of page changes in an SPA?

A

Move focus to the first H1 of the new page and add tabindex -1 to it so it is read out.

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

When would we change focus on an SPA?

A

User activates button - focus to first element

User activates a link that takes them to a new location in the SPA- focus to first H1 or element

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

How can ARIA roles be used to help an SPA user?

A

Where HTML elements do not provide accurate roles natively (, ) use the role attribute with region and a descriptive aria-label

<div></div>

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

How can you ensure the SPA user is not taken outside of the SPA when they click the previous button?

A

Use the History API to store the states and use JavaScript to enable normal previous and next operability

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

Can screen readers see when new content is added via AJAX?

A

No. (maybe in the future?)

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