WAS Study Flashcards
What are the main priorities when it comes to page titles?
- They must be present and contain text 2. They must update when the page URL changes (even for SPA) 3. They must be accurate and informative
What are page title best practices?
Theys should be concise, they should be unique if possible, unique information should come first, title should match or be similar to the top heading in the main content.
What are the main priorities when it comes to page language?
- The primary language of the page must be specified in the [html] element 2. The language must be identified using the standard list of language codes (lang=”en”, not lang=”english”. All screen readers support the 2-letter language codes, while some will support the addition of a localized code (en-gb for english - great britain)
What happens if a web page does not specify the page language, or if the language is wrong?
- If it does not specify the language, it will read it in the default language the user selected when installing the screen reader. 2. If it is in the wrong language, it will read the page in a funky accent (i.e an english page with a spanish language specification)
How can you specify the language of a part within the page?
Inline language changes can be identified by using the lang=”xx” attribute on any block level elements ([div], [h1], [p], [table], etc.) as well as inline elements ([span], [a], [strong], etc.)
Name the HTML landmarks and there ARIA role equivelents
HTML: [header], [nav], [main], [aside], [section], [article], [form], [footer]. ARIA: role=”banner”, role=”navigation”, role=”main”, role=”complimentary”, role=”region”, role=”article”, role=”form”, role=”contentinfo”
What is the best way to distinguish between multiple landmarks on a page, such as a main navigation and a table of contents?
by using programmatically determinable labels (aria-label or aria-labelledby). Ex: [nav aria-label=”Table of Contents”] or if table of contents is a heading already, you can use aria-labelledby.
Which 3 aria roles should not be used more than once per page?
Banner, Main, and Contentinfo
What are the two ways headings can be established progromatically?
Using the proper semantic tag, like [h1] ; Or using role=”heading” with aria-level=”[1-6]”. ([div role=”heading” aria-level=”1”])
What are the best practices for headings
Headings are created using proper structure and not done visually. Headings are accurate and informative of the content within that section. Headings should be concice and relatively brief. Do not skip hierarchal levels ([h3] then [h1])
Which of the following will be recognized as a valid heading by screen readers? A. [h1][/h1] B. [h7]Legal disclaimer[/h7] C. [div role=”heading” aria-level=”3”]The secrets beneath the ocean’s surface[/div] D. [p class=”heading level2” style=”font-size: 200%; font-weight: bold”]Understand yourself[/p]
C
True or False - Screen readers will read the alt text of an image within a heading as part of the heading text.
TRUE
What are the two ways to designate links programatically?
- Using the [a] tag with a valid href attribute. 2. Using role=”link” AND tabindex=”0” + the associated js allows the user to activate the link with either a click action or the enter key (both event handlers must be present).
In general, When should you use a link vs a button, and why is it important for Screen Reader users?
Links should take the user somewhere(either to a different page or on the same page), where Buttons should activate scriped functionality (like opening a modal [submit buttons are an exception]). When a screen reader user wants to find a link, the user may pull up the list of links and not find the link anywhere because it turns out that it has actually been designated as a button in the markup, or vice versa.
What is the precedence ranking for link text to a SR?
aria-labelledby
aria-label
Text contained between the opening [a] and closing [/a] elements (including alt text on images)
title attribute (note that this is considered a last resort method for screen readers to find something; it should not be considered a primary technique for giving names to links)
True or False - links can have an accessible name by providing an image with alt text within the [a] tag?
True, this is valid: [a href=”https://dequeuniversity.com/curriculum/”] [img src=”info.png” alt=”Web accessibility curriculum”] [/a]
What are some best practices for links?
- They should describe purpose or destination when read out of context 2. They should say if they open in a new window 3. They should say the document type if applicable (PDF Document) 4. They need to be visually distinguishable from surrounding text
What contrast ratio is needed for links in comparison to surrounding text?
3 to 1
What are the best practices for navigations?
They should be labelled by [nav] or role=”navigation”. They should denote which page is active visually and by using aria-current (or an aria-label or clip-text technique). Navigation should be consistent and not change order from page to page.
What are the best practices for skip links?
They should be at the beginning of the DOM. They should be visible all the time or on keyboard focus. Do not use display:none or else keyboard wont be able to access it.
What are the best practices for focus/reading order?
The reading and navigation order must be logical and intuitive. Don’t use positive tabindex. Focus order will follow the DOM order, not the visual order.
What are the rules for single-key shortcuts
If they exist there must be a way to turn them off, re-map them, or are only active when the relevant component has focus. Users who navigate with speech accidentally say ‘D’ and delete something instead of their intended word of ‘D-enote’
What are best practices for pagination?
Pagination should have a visual way to denote the active page, and it should denote to blind users as well - either through aria-current, aria-label, ect. Ex: ( [li][a href=”#” aria-current=”page”]3[/a][/li])
Best practices for semantic markup of tables?
Tabular data should be represented in a [table]. Don’t create fake tables (create the look of a table without using actual table semantics)
What are the rules for table names?
The table must have a programatically associated name using the caption element or aria-label/aria-labelledby. SR users can pull up a list of tables on the page that will announce their name and size. Without a name, they will all say just a table size with no info on what they are about.
Examples of how to name tables the right way?
Best: [table][caption]1st Quarter Results[/caption] OR [table aria-label=”Second quarter Results”] OR [h3 id=tableCaption]x[/h3] [table aria-labelledby=”tableCaption”] Or [table aria-labelledby=”tableCaption”] [figcaption id=tableCaption]
What things must every table have?
Tables must use the correct semantic [table] markup. Tables must have a programatic name, usually [caption]. Table headers must all be identified using [th]. It is a good idea to add the scope to the [th] by adding a scope of one of the following: col, row, colgroup, or rowgroup.
How to make complex tables with irregular stucture
These should be avoided, however you can do it by utilizing headers element and id’s.
While layout tables must be avoided, what are best practices if they must be used?
the table should have role=”presentation” so that SR will not interprate them as a table. They also should NOT contain any data table markup, such as: [caption], [summary], [th], scope attribute, headers attribute.
What are best practices for lists?
They must be semantically correct. I.e [ul] or [ol] with [li] elements. Screen readers can also correctly identify lists within lists with correct markup. For definition lists use ([dl]) render as paired terms ([dt]) and definitions ([dd]).
What are best practices for iFrames?
They must have a [title] attribute with a meaninful description and is unique to the page
What is true regarding [em] (italics) and [strong] (bold), in regards to screen readers?
They are ignored by screen readers of most types, some readers have a setting to have them aknowledged but it is not common. Some work arounds are to add words like “Important:” or a visually hidden text using clip-text method
Explain each semantic element and wether it will be read by screen readers? (and work arounds for those who don’t): [blockquote], [em], [q], [strong]
[blockquote] will be recognized by SR and can be used. Don’t use it for visual styling alone. [em] (italics) will not be recognized. [strong] (bold) will not be recognized. You can add inline text or clip method to add hidden context for these. [q] is a quote tag but is not recognized by SR.
What is true about the [pre] and [code] elements?
[code] will be ignored completely by screen readers but is good for sighted users. [pre] formats the code to distinguish it from surrounding text. Good for sighted but not for SR.
What is true about the [ins] and [del] elements?
[del] is strikethrough. The text will be read by SR, but will not indicate it has been strikethrough. [ins] is to inset text, usually for legal documents. The text will be read but will not indicate it has been inserted. Need to use hidden text techniques to add this context.
What is the [mark] element and is it supported?
[mark] highlights the text and is useful for visual users. For SR users, they are not notified that it is highlighted. Will have to use hidden text techniues to add context.
How would you make an image map accessible?
Each [area] section needs its own alt-text, as well as the image itself.
What are best practices for implementing SVG images?
You should use [img] as the tag for svg’s or implement them inline in the html with [svg]. In either case it needs role=”img”. The downside of using [img] is the css and js cannot be manipulated. Svg in an [img] tag should always have alt-text, aria-label, or aria-labelledby. using inline [svg] should have a [title] element at the beginning of the [svg]
What is needed for complex SVG images?
You need to add a longer description of the content within the html, in a collapsed section, within a button dialog, etc. Or you can use the [desc] element in the SVG, but this is not preferred since sighted users can’t see it. It is a last resort however, if the others are not provided. The [desc] attribute of an [svg] element MUST be programmatically associated with the [svg] element (via aria-labelledby).
What are the best practices for text within SVGs?
If the text is within the SVG, it should be tagged with an id to be referenced, along with the svg title, by an aria-labelledby on the svg element. There should also be a background color behind the text, so high contrast mode does not create a contrast issue.
What are best practices for SVG animations?
Use Javascript and not [animate]. Do not flash more than 3 times a second. Do not last longer than 5 seconds. Allow users to pause animation
What are best practices for Interactive SVGs?
Interactive [svg] objects MUST be fully keyboard-accessible. Interactive [svg] objects MUST be fully touchscreen-accessible. Interactive [svg] objects MUST communicate the applicable name, role, and value of controls, events, and semantic elements within the [svg] object.
How does the way a SR treat alt text differ from regular text on a page?
- You cant pause or restart alt-text reading 2. You can’t navigate alt-text by word or character 3. older SRs may stop reading after a certain length.
Name three ways to hide an image from a SR
- you can add null alt-text (alt=””). 2. You can add role=”presentation” 3. you can add the image as a css background-image property
What are the benefits and best practices for icon fonts?
The benefit is they will change color with the rest of the text if the user customizes text and bg colors. They need role=”img” and alt text (usually aria-label).
How do you make canvas elements accessible?
They need role=”img”. They need alt text provided using aria-label (or sometimes aria-labelledby). You can add fallback text within the canvas itself as a regular text element. Canvas elements should have a fill background in case user changes to high contrast mode.
Do canvas elements support keyboard controls?
Not initially. You will need to add name and role values to any actionable content within the canvas, as well as using javascript to add keyboard focus and spacebar/enter events.
True or False - All live and prerecorded video must have syncronized captions?
TRUE
True or false - Videos must include audio descriptions
TRUE
What is the [object] element and what does it need to be accessible?
used to display content like images, PDF files, videos, and audio, among other things. It needs an aria-label or aria-labelledby
What are the best practices for color contrast of text?
Under 18pt regular or 14pt bold needs 4.5:1 contrast. 18pt or over and 14pt bold or over needs 3:1. note pt is not pixels, each pt is 1.33 pixels.
What are the touch size requirements
Must be 24 x 24 for AA, unless the offset between the other components is more than 24px. AAA is 44 x 44 pixels and what is recommended