Forms Flashcards

1
Q

What are the most important attributes of accessible labels?

A
  • Labels must be meaningful, i.e., they must clearly explain the purpose of the field.
  • Labels must be programmatically associated with their control.
  • Labels must be visible at all times.
  • Labels must be in close proximity to their control.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s a form input’s “accessible name”?

A

its label

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

True or False: icons should not be used as form labels.

A

False

Icons MAY be used as visual labels (without visual text) if the meaning of the icon is visually self-evident AND if there is a programmatically associated semantic label available to assistive technologies.

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

The most recommended method to programmatically associate a label and form field is:

A. aria-label attribute
B. title attribute
C. Explicit <label> association
D. Implicit <label> association</label></label>

A

C. Explicit <label> association</label>

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

Why is the use of placeholder text as a form label bad for accessibility?

A. The default color for placeholder text does not meet color contrast requirements
B. Placeholder text disappears when data is entered in the field
C. Placeholder text is not supported in most browsers
D. A and B
E. All of the above

A

D. A and B

The default color for placeholder text does not meet color contrast requirements

Placeholder text disappears when data is entered in the field

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

Which of the following statements about labels is NOT correct?

A. Labels should be visually close to their corresponding form fields.
B. Labels must be programmatically associated with their matching elements.
C. Labels should be close to their corresponding form fields in the DOM.
D. Labels should be close in length to the other labels on the page.

A

D. Labels should be close in length to the other labels on the page.

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

True or false: When multiple visible labels are used to label one field, the best attribute to associate each label with the field is aria-label.

A

False

use ` aria-labelledby`

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

True or false: When one visible label is used to label multiple fields, such as the three parts of a telephone number, each individual field must have a screen reader accessible label.

A

True

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

What are two ways related form controls can be programmatically grouped?

A
  1. The HTML solution consists of using a <fieldset> to semantically group the form fields and a <legend> to provide a semantic group label.
  2. The ARIA solution consists of semantically grouping fields within a group region and providing a semantic group label using the aria-labelledby attribute.

NOTE: VoiceOver does not yet support role=”group” as a way to label a group of form elements. For this reason, <fieldset> and <legend> are still preferred over role=”group”.

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

What are three options for adding instructions to a group of form fields?

A
  1. add instruction text to the legend of a fieldset (only if short)
  2. Associate the instructions with one of the fields (usually the first field is best) within the group, using aria-describedby
  3. Put the instructions before the start of the whole form, as regular text not associated with anything, and hope that screen reader users read them before jumping in to form mode.

Putting regular text in the middle of a form runs the risk that screen reader users will not hear it because if they’re tabbing only to focusable elements, they will skip over all non-focusable text, unless that text is programmatically associated with a group label or an input.

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

How should you identify required form fields?

A
  • The aria-required="true" indicator should be set on the input. The HTML required attribute would also work, but it changes browser behavior.
  • A supplemental visible indicator should be available to sighted users.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following methods does NOT programmatically associate form instructions with their associated fields?

A. Using aria-describedby on the <input></input> element
B. Providing instructions in regular text nearby the <input></input> element
C. Placing instructions in the <label> element
D. Placing instructions for a group of fields in the legend</label>

A

B. Providing instructions in regular text nearby the <input></input> element

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

Instructions that aren’t placed visually near their corresponding form fields can negatively impact which of the following user categories?

A. Users who are blind
B. Users who have low vision
C. Users with vestibular disorders
D. All of the above

A

B. Users who have low vision

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

Which of the following methods is NOT a best practice for progressive form updates?

A. Provide a summary of users’ choices at the end of the form before submission
B. Include only one step on the screen at a time
C. Number the steps in the form
D. Manage keyboard focus as users move forward and backward through the form
E. Make dynamic changes in the form anywhere in the DOM

A

E. Make dynamic changes in the form anywhere in the DOM

Changes should only occur later in the DOM

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

To conform to ARIA specification, all of the following methods should be applied when creating a custom checkbox within a form EXCEPT:

A. Provide a visible and programmatically-associated label for the checkbox
B. Ensure the checkbox is assigned role=”checkbox”
C. Convey to users the state of the checkbox through toggling aria-expanded values
D. Make sure the Space bar can be used to change the state of the checkbox

A

C. Convey to users the state of the checkbox through toggling aria-expanded values

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

What might happen if an aria-live announcement is tied to a blur event in a form?

A. A screen reader might read the announcement after it reads the next item in focus
B. A screen reader user might miss the announcement because the announcement competes with the screen reader reading the next item in focus
C. The aria-live announcement might be made before the screen reader reads the next item in focus
D. None of the above

A

B. A screen reader user might miss the announcement because the announcement competes with the screen reader reading the next item in focus

17
Q

What should happen to the page title if a form submission causes the same page to reload?

A. Nothing should happen to the page title
B. The page title should reflect errors in form submission
C. The page title should reflect the status of the form submission
D. Form submission should not cause the page to reload

A

C. The page title should reflect the status of the form submission

18
Q

Which ARIA attribute should be used to identify which form elements have errors?

A. aria-required
B. aria-describedby
C. aria-readonly
D. aria-invalid

A

D. aria-invalid

19
Q

Which ARIA attribute should be used to provide more information about an error in a form element?

A. aria-required
B. aria-describedby
C. aria-readonly
D. aria-invalid

A

B. aria-describedby

20
Q

True or false: The basic keyboard commands for interacting with HTML form controls are common across all screen reader / browser combinations.

A

True

21
Q

Using the Tab key to move through a page will put focus on all of the following elements EXCEPT:

A. Form fields
B. Links
C. Elements with tabindex=”0”
D. Elements with tabindex=”-1”

A

D. Elements with tabindex=”-1”

22
Q

True or false: Since plain text is non-focusable, text such as instructions or formatting hints should not be placed in the middle of a form unless the text is programmatically associated with a focusable element.

A

True

23
Q

What HTML attributes are used to programmatically link labels and inputs?

A

for on the label and id on the input should match

24
Q

When should you use the autocomplete attribute?

A

When an input is asking for personal information from the user.

example: autocomplete="email"

This is required for WCAG 2.2

25
Q

True or False: A single form field can have more than one label.

A

True

26
Q

True or False: Any given label element can be associated with only one input element.

A

True