Accessible Graphics on the Web
(and beyond)
- Amelia Bellamy-Royds
- Libre Graphics Meeting 2015
- 30 April 2015
What does accessibility mean?
- The user can understand the information presented
- The user can control any interactive functions
- Regardless of sensory limitations, mobility limitations, cognitive limitations
How does accessibility work on the web?
- For accessibility tools such as screen readers, content must be machine-readable
- Web pages contain markup describing the meaning & function of content
- The browser processes it & interacts with OS accessibility API
- Accessibility tools interface with the accessibility API
- But, many people with limitations do not use these tools, so the web page must stand on its own
- Color blindness
- Low vision (just use browser zoom, etc.)
- Hearing problems
- Cognitive/neurological differences
- For user input, most specialized devices act like keyboard or mouse
- But often slower
- But often less precise
- Touchpads & onscreen keyboards make these universal issues
Two sides to the story…
- Are your software tools accessible?
- Can anyone who want to create a graphic use your tool?
- Can they understand it?
- Can they make it do what they want?
- Do your tools create accessible graphics?
- Can you automatically make things more accessible?
- Can you prompt the user to add more accessibility support?
Can you be more specific?
- Use the Web Content Accessibility Guidelines (WCAG 2.0)
- Guidelines == broad goals
- Conformance standards == specific requirements
- Level A: Avoid the worst problems
- Level AA: Avoid more tricky issues
- Level AAA: Make things easy to use
- Guidelines & standards are technology-agnostic
- Specific techniques are available for HTML, PDF, other web documents
- For designing software that creates accessible content
WCAG 2: Four Categories
- Perceivable
- Operable
- Understandable
- Robust
Perceivable
Users can receive information, regardless of sensory limitations
- Text alternatives for image, video, and audio (and text stored within images!)
- Captions or other formats for audio, video, and animation (time-based media)
- Provide logical structure independent of visual layout
- Effectively contrast foreground vs background graphics and audio
Operable
Users can interact with content, regardless of input device
- All functions keyboard operable
- Avoid time-based limitations
- Do not create epilipsy seizure triggers (flashing/blinking content)
- Provide effective navigation tools
Understandable
The content & function is easy to understand, regardless of how a user perceives & interacts with it
- Clearly identify the language of text, and offer interpretation hints
- Avoid sudden/unexpected changes in the content as the user navigates or fills in input
- Make the purpose of user input clear, and help users avoid and correct mistakes
Robust
Content works in many software/input environments, even after accessibility alterations
- Maximize compatibility, ensure optimum fallback, make important information machine-accessible
Can graphics be accessible?
- What are you trying to communicate?
- Brand?
- Data?
- Structure?
- Mood?
SVG for Accessible Graphics
- Vector graphics == good resolution when magnified
- XML == structured content
- Visible text stored as text
- Alternative text within the main document
- Alternative text associated with sub-components of graphic
Current Limitations of SVG Accessibility
- XML text not always accessible through modern (SVG-supporting) web browsers
- Font & text problems == text as path
- Interactive components difficult to make keyboard accessible
- The meaning of text formatting and grouping structure is not accessible
- No easy way to navigate complex graphical structures (e.g., data charts)
Improving Accessible SVG
- Use ARIA (Accessible Rich Internet Applications) attributes
- Support keyboard navigation
- Allow multi-lingual alternative text
- Allow greater user style customization
Using ARIA
role
attributes defines what content is
- heading
- list item
- clickable button
- property attributes define additional information for navigation
- state attributes define current status of interactive components
- a checkbox is checked
- a collapsible section is expanded & visible
- Limitation: ARIA was defined for standard web page layouts and widgets, not a lot of support for graphics yet
- The SVG Accessibility Task Force is trying to come up with more roles for charts & graphics
Better keyboard navigation
- SVG 2 will have basic
tabIndex
support similar to HTML
- More complex navigation being considered
- 2D scanning
- Tree traversal
Multi-lingual alternative text
- Currently, only one text alternative is possible per element
- SVG 2 will allow multiple
<title>
and <desc>
elements distinguished by language code
- Backwards compatible: existing browsers will use first element
User style overrides
- Easy to implement, difficult to implement effectively
- Many possible alterations could improve accessibility:
- larger fonts
- thicker lines
- higher contrast
- color replaced with texture
- But, how to implement so that meaning of graphic is not lost?
- ARIA might help distinguish information from decoration
Making Other Graphics Accessible
- In the web browser
- For HTML+CSS, use semantic markup where possible, ARIA where required
- For HTML 5 Canvas graphics, use a structured HTML+ARIA shadow DOM tree
- Wherever possible, provide content in multiple formats (e.g., data table + data chart)
- In other software
- Need to directly communicate with OS accessibility API
- For XML-based formats, consider using ARIA
- New ARIA roles and other attributes will help with all XML/HTML markup graphics