Accessible Web Graphics with SVG and Canvas

Doug Schepers (W3C), @shepazu

slide

SVG

Scalable Vector Graphics

slide

Like HTML for Graphics

Code sample of SVG 'circle', 'rect', and 'path' elements, with rendered view of results.

Like Illustrator for the Web

slide

Origin of SVG

Several input technologies

SVG merged aspects of all of these into one.

slide

The Rise and Fall and Rise of SVG

A line chart showing the general trend of SVG usage from 1998 to present.

slide

Common Uses of SVG

A line chart showing the general trend of SVG usage from 1998 to present.

slide

Drawing detail

A detailed drawing of a yellow sports car.

slide

Drawing detail, part 2

A simple drawing of a yellow compact car.

slide

Rasters vs. Vectors... Fight!

An illustration contrasting blocky raster graphics and smooth vectors.

slide

SVG Shapes

The different styles and shapes of SVG.

slide

Text

slide

Transforms

Transforms alter the coordinate grid, not just the shape.

slide

Animation

Transforms alter the coordinate grid, not just the shape.

slide

Scripting

Transforms alter the coordinate grid, not just the shape.

slide

Responsive Image Format

Demo of the HTML5 logo with different levels of detail at different sizes.

slide

SVG with CSS Media Queries

An illustration with the SVG logo at 3 different sizes, full, medium, and icon.

slide

How do I create SVG?

slide

Canvas API

slide

Canvas Example

Code sample of drawing overlapping rectangles with the Canvas API, with rendered view of results.

slide

SVG and Canvas API

SVG Canvas API
document-based script-based
vectors pixel operations
object model with hit-testing and events low-level graphics API, no scene graph
performance hit with large numbers of shapes fast rendering
accessible must create accessible equivalent

Use both!

slide

SVG vs. Canvas API

SVG Canvas API
user interfaces fast-paced games
scalable images very complex images
interactive animations highly dynamic visualizations
for designers for developers
slide

SVG and Canvas API Scripting

slide

Graphics Accessibility Basics

slide

SVG Accessibility Overview

slide

Exploring Graphics

A simple drawing of a yellow compact car, with the structure of the document exposed.

Not all graphics make sense to explore, many should just be described in text.

slide

Exploring Data Visualizations

A bar chart, with the structure of the document exposed. The axes and values are labeled.

Structured graphical content is useful to allow the user to explore.

slide

Accessible SVG Chart

The same accessible SVG bar chart, with code extracts showing how it was done.

slide

Canvas and the Shadow DOM

The Shadow DOM is like a hidden document embedded inside an element, which exposes the underlying structure of that element.

An illustration of a bar chart generated from an ordered list.

slide

Browser and Screen Reader Support

slide

Demos

slide

Data Portability

slide

Cognition

An illustration of a brain.

slide

Pictorial Superiority Effect

slide

Visual Processing

slide

Learning Modes

slide

Visual Bias

slide

Visual Vocabulary

An illustration of several scattered chart types.

Chart comprehension must be learned; children don't know how to read a bar chart, and when we encounter a new chart type, we have to learn to "read" it.

Charts are made up of structured parts, such as the labels, axes, and data points.

slide

Complexity

An illustration of two complicated charts, one attractive, the other cluttered and ugly.

Complex charts are hard for everyone to understand. They also make accessibility even harder to achieve.

Keep data visualizations simple. Make a poem, not a novel.

slide

Visual

An illustration of an eye.

slide

Magnifier

An demo of a magnifying app, which illustrates how difficult it is to understand data visualizations with narrowed context.

Magnifiers have many similarities to mobile phones; good design accommodates both.

slide

Color Blindness

A cartoon panel that jokingly combines a color blindness test with synesthesia.

slide

Colors

An illustration of an eye with rainbow colors.

slide

Hues

A cartoon panel with a strobing rainbow-colored manatee, with the caption, "Oh, the Hue-Manatee".

slide

Brewer Palette

Three sets of colored dots, illustrating different color schemes with balanced hues and perceivable contrast combinations for different purposes.

Cynthia Brewer hand-picked these color palettes for maps.

slide

Palettes and Patterns

An illustration of Australia with a subdued Brewer palette coloring each state, switching to the same image with sharply-contrasting (and gaudy) patterns rather than colors.

Patterns can be a good substitute for colors for grayscale images, or for printing on tactile paper for blind users.

slide

Tactile

An illustration of a hand.

slide

Audible Tactile Maps

An illustration of a map with raised features for roads, urban ares, and water. This map can be printed on textured paper and overlaid on a touch surface to make it interactive.

Print with Braille font. Any font can be replaced with Braille for tactile printing.

slide

Interactivity

An illustration of a hand swiping one finger.

slide

A picture of a young woman using a 2-way sip-puff switch.

slide

Animation Accessibility.svg

  • Limit or eliminate flashing No more than 3 per second
  • Caption animations
  • Updates (stock feeds, game scores, other live data)
  • slide

    ARIA Attributes

    An illustration of two buttons, a red and blue button, seemingly identical except for the color. But the red button is just an image, while the blue button has the ARIA role 'button', making it accessible to screen readers and other accessibility technology.

    slide

    Element Focus

    A focusing demo of two columns of numbers 1–6, and two columns of 6 dots.

    Tabbing should focus each element in turn, via 'tabindex'.

    slide

    Auditory

    An illustration of an ear.

    slide

    Sonification

    A demo of a line chart that has a cursor sweeping across it, with a dot following the curve of the line. An audible tone plays, with the tone's frequency rising or falling along with the dot.

    This allows blind uses to get a gist of the line's trend.

    slide

    Olfactory

    An illustration of a nose.

    slide

    Scratch ’n Sniff

    A humorous illustration of an pie chart of favorite fruits, which could be printed with Scratch ’n Sniff ink.

    slide

    The Future of SVG

    An animated illustration of an clock with the hands moving forward rapidly.

    slide

    ARIA Vocabulary

    An illustration of several chart types, neatly arranged in rows and columns.

    Structured data and structured graphics can be represented with a structured vocabulary.

    slide

    Reference Data Point

    An image of a bar chart with 30 bars representing different countries, with two bars highlighted to show the USA and the OECD average.

    Accessible information graphics should allow users to explore, comparing and contrasting different values.

    slide

    SVG Connectors

    SVG Connectors are a proposal to allow the accessible representation of dot-line graphs. Graph have many forms:

    slide

    WebPlatform.org

    An illustration of the WebPlatform logo as a line chart.

    WebPlatform.org is a community-driven site where you can learn and share information on Web development and design, including accessibility, SVG, and the Canvas API.

    slide

    Web Standards Community

    An illustration of the Earth as a globe, animating into nested Venn diagrams of smaller and smaller communities, ending in a pie chart of the W3C staff.

    slide

    Sustainable Web

    The traditional Sustainability Venn diagram of overlapping circles of social, economic, and environment concerns, changing into HTML, CSS, and SVG.

    slide

    Get Involved!

    slide

    Thanks!

    Credits:

    slide