Coding for Accessibility Flashcards
What aria property sets a form field as required?
aria-required
What is the HTML tag equivalent of landmark role=banner?
<header>
What is the HTML tag equivalent of landmark role=complementary?
<aside>
What is the HTML tag equivalent of landmark role=contentinfo?
<footer>
What is the HTML tag equivalent of landmark role=navigation?
<nav>
What are the 8 landmark WAI-ARIA roles?
- banner
- complementary
- contentinfo
- form
- main
- navigation
- region
- search
What is the HTML tag equivalent of landmark role=region?
<section aria-label>
Which semantic element displays a hand pointer on hover state?
Link
Is touch functionality covered by support for click events or keyboard events?
Click events
What is the minimum recommended touch target size?
44 x 44 px
What is the effect of role=presentation on screen readers?
It removes the default semantics and implicit ARIA from the accessibility tree. For example, and <h2> will be treated as a <div>
Is keeping headings in hierarchal order a MUST or a SHOULD for AA conformance.
SHOULD
What aria attribute tracks paginated views for screen readers?
aria-current
What is the main thing to add when coding an accessible iframe (MUST exist for AA conformance)
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>
What would be considered the best practice when choosing the title attribute for an iframe?
It should match the <title>
element of the enclosed document.
How do the headings of an iframe relate to the headings of the main page?
The iframe headings are part of the main page accessibility tree and SHOULD be designed to fit into the main page hierarchy if possible.
What aria attribute should be added to an iframe without meaningful content
aria-hidden
What 2 properties will disable pinch-to-zoom when set on the meta viewport element?
user-scalable=no and maximum-scale=1.0.
What attributes will override the alt
attribute text on an img
element
aria-label
and aria-labelledby
How should an image be coded in order to be ignored by a screen reader?
Have an empty alt attribute and no aria-label or aria-labelledby attribute
What is the difference between role=application
and role=presentation
?
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.
What is the difference between role=alert
and role=alertdialog
?
Role=alert
announces but doesn’t require user interaction or focus.
Role=alertdialog
requires user interation and therefore also requires focus.
What are 2 other ways to hide images from screen readers aside from empty alt text?
- Role=presentation
- Implement as CSS backgrounds
What is the max number of characters that SHOULD be used in alt text?
150