Show and hide techniques with HTML and CSS Flashcards

1
Q

What does the HTML5 attribute hidden do?

A

The HTML5 attribute hidden removes the content and the content wrapped inside that element completely from sight, from the tab order and from the accessibility tree, as if it doesn’t exist. The content is hidden for all users.

tab order: hidden
screen reader: no announcement.

https://www.a11y-collective.com/courses/accessible-code/lessons/show-and-hide-techniques/topics/hide-content-from-sight/

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

What does the CSS property display: none; do ?

A

It removes the content and the content wrapped inside that element completely from sight, from the tab order and from the accessibility tree, as if it doesn’t exist. The content is hidden for all users.

tab order: hidden
screen reader: no announcement.

https://www.a11y-collective.com/courses/accessible-code/lessons/show-and-hide-techniques/topics/hide-content-from-sight/

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

What is the difference between HTML5 attribute hidden and CSS property display: none?

A

The difference between the two is that when a stylesheet is disabled, display: none; doesn’t work anymore, but the hidden attribute does still work.

https://www.a11y-collective.com/courses/accessible-code/lessons/show-and-hide-techniques/topics/hide-content-from-sight/

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

How do you hide content from a screen reader by not from sight?

A

This can be done using the ARIA attribute
aria-hidden=”true”.

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

Which CSS properties hide an element, and the content inside, from a screen reader? Check all that apply.

A. display: none;
B. visibility: hidden;

C. opacity: 0;

A

A. display: none;
B. visibility: hidden;


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

Which CSS properties remove an element, and the content inside, from the tab order? Check all that apply.

A. display: none; 

B. visibility: hidden;
C. opacity: 0;

A

A. display: none; 

B. visibility: hidden;

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

aria-hidden=”true” … Check all that apply:

A. hides an element, and the content inside, from sight
B. hides an element, and the content inside, from a screen reader
C. removes an element, and the content inside, from the tab order

A

. hides an element, and the content inside, from a screen reader

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

The screen-reader-text class in WordPress (check all that apply):

A. hides an element, and the content inside, from sight

B. hides an element, and the content inside, from a screen reader
C. removes an element, and the content inside, from the tab order

A

A. hides an element, and the content inside, from sight


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