1 of 38

Completing an Accessibility Audit

San Francisco Digital Services

2 of 38

What We Will Review

  • Different types of tests that you need to perform.
  • How to approach testing.
  • Documenting accessibility issues.
  • Deep dive and demo of a few accessibility guidelines.
  • How to test and comply with these guidelines.

3 of 38

Test and Complete an Accessibility Audit

The only way to know if your website is compliant with the city's Digital Accessibility and Inclusion Standards is to test it and complete an accessibility audit.

4 of 38

Types of Accessibility Tests

5 of 38

Types of Accessibility Tests

  1. Automated Testing
  2. Manual Testing
  3. Screen reader testing
  4. Keyboard only testing
  5. Mobile testing

6 of 38

Automated Testing

  • An automated test will scan and evaluate your website for potential accessibility issues.
  • Will scan the code against the WCAG 2.1 guidelines which are the foundation for the DAIS.
  • May report false positives.
  • Review the automated test report and identity if they are valid issues.
  • An automated test will only identify 30-40% of issues.
  • Example of automated test report .

7 of 38

Document Issues

  • Capture any issues in a separate document.
  • Add links to pages or documents that don’t comply with a specific accessibility guideline.
  • Example of audit report document.

8 of 38

Manual Testing

  • First test any global elements such as site header, footer, repetitive navigation menus.
  • Document global issues in the audit report document.
  • Complete manual testing of content area. Content between the header and footer.
  • Document issues.

9 of 38

Manual Screen Reader Testing

  • A screen reader will read out loud the web page content to the user.
  • A screen reader interacts with the web page by using different keyboard keystrokes.
  • JAWS is the most popular screen reader. Windows based and requires a paid license.
  • NVDA is a free, open source screen reader.
  • Guide on testing with screen readers.

10 of 38

Manual Keyboard Only Testing

  • Users who rely on only using a keyboard to access online content.
  • Keyboard only users are not able to use a mouse.
  • Keyboard only users will use different keystrokes to navigate a web page and activate interactive elements.
  • Will use the TAB key to navigate through links, buttons and form controls.
  • Keyboard only testing guide, including common keystrokes for different web interactions.

11 of 38

Manual Mobile Testing

  • Website content must be fully accessible on mobile devices, including the use of mobile screen readers.
  • iOS and Android mobile devices both have built in screen readers. VoiceOver and TalkBack.
  • Mobile screen reader users use different tapping and swiping gestures to navigate through a web page and interact with site content.
  • Mobile screen reader testing guide and mobile best practices.

12 of 38

Time Required for Testing

  • Will vary depending on the number of pages on the site, how much functionality and interactive elements there are on the site
  • Forms are time consuming to test.
  • Static content is faster to test than interactive content.
  • PDF documents can be time consuming to test.
  • Some automated testing tools will test PDF documents.
  • Testing guides/resources on the DAIS Sharepoint site.

13 of 38

Demo of Accessibility Guidelines

14 of 38

Provide Alternative Description (ALT Text) for Images

15 of 38

Overview

  • Provide alternative text for images for screen reader users.
  • ALT text helps screen reader users understand the meaning of an image.
  • The screen reader will read out loud the ALT description to the user.

16 of 38

Guideline Expectations

  • As a screen reader user I should be provided with meaningful alt text for non-decorative images.
  • As a screen reader user I should be able to bypass decorative images that have no meaning.

17 of 38

Non-Decorative Images

  • A non-decorative image is a graphic that has meaning.
  • It could include important text that needs to be conveyed to a screen reader user who is unable to see the image.
  • For example the department name in a logo.

The text and icon is one image.

18 of 38

Decorative Images

  • Decorative images have no real meaning.
  • They don’t include important text and may just be there to provide visual decoration for sighted users.
  • Often times decorative images will display a link next to the image that describes what the image is trying to convey. It would be redundant to have an ALT text that conveys the same thing as the link.
  • A screen reader will bypass images that have been marked as decorative images.

19 of 38

How to Comply - Non-Decorative Images

Meaningful and compliant ALT text:

<img src="sfhsa-logo.svg" alt="San Francisco Human Services Agency">

Non-meaningful and non-compliant ALT text:

<img src="sfhsa-logo.svg" alt="Logo">

20 of 38

How to Comply - Decorative Images

Compliant ALT text:

<img src="icon.png" alt="" width="304" height="50">

Non-compliant ALT text:

<img src="icon.png" alt="icon" width="304" height="50">

21 of 38

Automated Testing of ALT Text Guideline

  • The automated testing tool will scan all images across the site and identify if an ALT text is present.
  • If there is no ALT text present it will flag the image as a failure for not meeting the accessibility guidelines.
  • The automated test will not be able identify if the alt text is meaningful or if it's a decorative image.

22 of 38

Review Automated Test of ALT Text Guideline

Review the automated report and identify if it flagged images without alt text. Example of automated report.

If there is no ALT text present you need to identify:

  1. If it's an image that has meaning (logo with dept name)

  • If it's an image that has meaning and no alt text is present, it's an issue. Image needs to be updated with meaningful alt text.

b) If it's a decorative image that has no meaning.

  • If the image has not been marked as a decorative image in the code it's an issue. Needs to be marked as decorative.

23 of 38

Manual Testing of ALT Text Guideline

Review images that already have ALT text present to identify:

  • If the ALT text is meaningful.

  • If the ALT text is not meaningful it’s an issue.
  • ALT text needs to be updated with meaningful ALT text.

b) If it's a decorative image that has no meaning.

  • If ALT text has been provided it’s an issue.
  • Image needs to be updated and marked as decorative.

Review existing ALT text using this tool.

24 of 38

Skip Repetitive Navigation

25 of 38

Overview

  • Allow screen reader and keyboard only users to skip repetitive navigation, such as global navigation menus in the header, that appear on every single web page.
  • As a screen reader and keyboard only user I should be able to bypass repetitive navigation and skip directly to the main content area of the page.

.

26 of 38

Guideline Expectations

  • A “skip to main content” link needs to be incorporated to all site pages.
  • The link needs to be visible to sighted keyboard only users.
  • The link should be placed at the very top of the page and redirect users to the beginning of the main content area.

27 of 38

Type of Test

  • This is a manual test using only the keyboard or a screen reader.
  • An automated test is not able to evaluate if this guideline has been met.
  • Example: Lighthouse for the Blind

28 of 38

How to Test

  1. When web page has loaded press the TAB key a few times.
  2. The “Skip to main content” or “Skip to content” link is the first link that should appear at the top of every web page.
  3. The "Skip to main content" link is by default hidden and only becomes visible to a sighted user when pressing the TAB key.
  4. When the “Skip to main content” link receives keyboard focus, press the Enter key to activate the link. You should be redirected to the main content area of the page.

If keyboard only test is successful, screen reader users will also be able to access “skip to main content” link.

29 of 38

How to Comply

<a href="#maincontent Class="skip-link visually-hidden visually-hidden-focusable">Skip to main content</A>

<main id="maincontent" role="main">

<h1>Heading</h1>

<p>This is the first paragraph</p>

</main>

30 of 38

Provide Keyboard Focus Indicator

31 of 38

Overview

  • This guideline is for sighted users who rely on only using a keyboard to access online content.
  • They are not able to use a mouse.
  • Sighted keyboard only users typically use the TAB key to navigate through interactive elements on a web page, such as links, buttons, fields for inputting text, etc.
  • When an item has keyboard "focus", it can be activated or manipulated with the keyboard.

.

32 of 38

Guideline Expectations

  • As a sighted keyboard only user I should be provided with a keyboard focus indicator for links, buttons, and form elements.
  • The keyboard focus indicator should be a visual border or outline that appears around the item that has keyboard focus.

.

33 of 38

Type of Test

  • This is a manual test using only the keyboard.
  • An automated test is not able to evaluate if this guideline has been met.
  • Example: Human Services Agency website.

34 of 38

How to Test

  • Once the web page has loaded in the browser press the TAB key to start navigating through the page.
  • When a link, button or form control receives keyboard focus a noticeable border should be displayed around the actionable item to let sighted keyboard only users know where they are on the page.
  • The user will then use different keystrokes to activate actionable items.

35 of 38

How to Comply

  • A sighted keyboard only user must be provided with a visual indicator of the element that currently has keyboard focus.
  • The keyboard focus indicator should have enough color contrast between the foreground and background

36 of 38

Example on How to Comply in the Code

HTML Code:

<button>Example button</button>

css Code:

button {

background-color: #236AB8; /* medium-dark blue */

color: white;

}

main button:focus {

outline: 3px #fff5be solid; /* yellow */

outline-offset: -4px;

}

37 of 38

Guides and Resources

38 of 38

Guides on How to Test and Comply

  • You can find links to tools and guides on how to test for these guidelines through the DAIS Sharepoint site.
  • You can find information on how to comply with all of these guidelines in our Accessibility Guide and Checklist.