Design principles for accessibility on Mac OS X
Gregory Hughes, Ph.D.
Software Engineer
Usable by Everybody
2
What Is Universal Design?
3
Three Main Focus Areas
4
Yellow Dog Productions · Digital Vision · Getty Images
5
Focus Areas
Users
6
7
Technologies
Focus Areas
Users
8
9
Developers
Technologies
Focus Areas
Users
10
Developers
Technologies
Focus Areas
Users
11
10 Million
Americans are visually impaired
www.afb.org/info_documents.asp?collectionid=15 [Mar 25, 2008]
12
S. Kochkin. Marketrak vii: Hearing loss population tops 31 million. The Hearing Review, (2005), July 2005.
31 Million
Americans are hearing impaired
13
12 Million
Americans have a learning disability
C. Smith and L. Strick. Learning Disabilities: A to Z. The Free Press, 1997.
14
50 Million
1 in 5
Americans have a disability
http://www.census.gov/Press-Release/www/releases/archives/facts_for_features_special_editions/001823.html
15
User Considerations
Visual Auditory
Cognitive
Physical
16
Developers
Technologies
Focus Areas
Users
17
Developers
Technologies
Focus Areas
Users
18
19
20
21
Talking iPods
22
VoiceOver
5 Years
Macs with VoiceOver
Millions
23
?>>>>
24
Developers
Technologies
Focus Areas
Users
25
Developers
Technologies
Focus Areas
Users
26
Universal Design Considerations
Visual Auditory
Cognitive
Physical
27
Implementing Universal Design
Perceivable
Operable
Understandable
Robust
28
How to Implement Universal Design?
29
Perceivable
Visual Considerations
30
31
Resolution
•Usable at low resolutions
â–  1024x768 recommended
â–  Aids users with visual impairments
â–  Aids elderly users
â–  Helps when displaying on a projector
32
33
Blurry on
purpose
34
Blurry on purpose
35
36
Font Size
•Provide adjustable font sizes for key UI
â–  Aids users with visual impairments
â–  Aids elderly users
â–  Helps during demonstrations
37
- (NSUInteger)adjustedSystemFontSize
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
CGFloat fontSize = [defaults floatForKey:@”fontSize”];
if ( fontSize < 8.0f )
{
return [NSFont systemFontSize];
}
return fontSize;
}
Adjust UI Font Size
38
- (NSFont *)adjustedSystemFont
{
CGFloat newSize = [self adjustedSystemFontSize];
return [NSFont systemFontOfSize:newSize];
}
Adjust system fonts
Adjust UI Font Size
39
- (void)updateFonts
{
[myTextLabel setFont:[self offsetFontForElement:myTextLabel];
[myTextLabel2 setFont:[self offsetFontForElement:myTextLabel2];
}
Apply to an element
Adjust UI Font Size
40
- (void)updateFonts
{
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
NSFont *newFont = [self adjustedSystemFont];
for ( NSTableColumn *column in [myTable tableColumns] )
{
id dataCell = [column dataCell];
[dataCell setFont:newFont];
}
CGFloat desiredHeight = [layoutManager defaultLineHeightForFont:newFont];
[myTable setRowHeight:desiredHeight + 1];
[layoutManager release];
}
Apply to an NSTable
Adjust UI Font Size
41
DOW J 0.30 %
Nasdaq 0.12 %
DOW J + 0.30 %
Nasdaq - 0.12 %
42
DOW J 0.30 %
Nasdaq 0.12 %
DOW J + 0.30 %
Nasdaq - 0.12 %
43
Blank on purpose
44
Accessibility API
Most items can be given a description in Interface Builder
45
- (void)accessibilitySetOverrideValue:(id)value
forAttribute:(NSString *)attribute
Programmatic accessibility
•Convenience method for anything that can be set in IB
NSAccessibility
46
Demo
47
Perceivable
Auditory Considerations
48
Blank on purpose
49
50
Blank on purpose
51
Every Mac includes a
range of built in features
to address those
with disabilities,
vision, hearing,
motor skills,
and learning disabilities and
all of these technologies
come standard on
every new Mac.
52
Blank on purpose
53
Auditory Considerations
•Don’t provide audio-only feedback
•All sounds should work in mono audio
•Be conscious of sound frequency choices
•Consider allowing user-selectable sounds
54
NSBeep()
55
NSBeep()
56
Dock Icon
Change icon to represent state
57
Dock Icon
Change icon to represent state
58
Dock Icon
Change icon to represent state
59
Dock Icon
Change icon to represent state
NSImage *myImage = [NSImage imageNamed:imageName];
[NSApp setApplicationIconImage: myImage];
60
Dock Icon
Badge the icon
[[NSApp dockTile] setBadgeLabel:@"1"];
1
61
Dock Icon
Bounce your icon
[NSApp requestUserAttention:NSCriticalRequest];
62
Dock Icon
Bounce your icon
[NSApp requestUserAttention:NSCriticalRequest];
63
Dock Icon
Bounce your icon
[NSApp requestUserAttention:NSCriticalRequest];
64
Demo
65
Operable
Physical Considerations
66
67
Physical Considerations
Provide interaction alternatives
•Provide keyboard shortcuts for common tasks
•Ensure full keyboard navigation
•Provide keyboard alternatives to mouse actions
68
Drag and Drop Keyboard Support
Provide a keyboard shortcut
•Add commands to change ordering
•Add cut/copy/paste support alongside
drag and drop
69
Enable Full Keyboard Access
Check tab order
70
Demo
71
Understandable
Cognitive Considerations
72
73
74
75
76
Fullscreen Mode
Bring an NSView into fullscreen to limit distractions
- (IBAction)enterFullScreen:(id)sender
{
[fullScreenView enterFullScreenMode:[NSScreen mainScreen] withOptions:nil];
}
77
Hiding Advanced UI
78
Hiding Advanced UI
79
Hiding Advanced UI
80
Demo
81
Summary
Resolution
Font size
Color choice
NSAccessibility API
Non-audible feedback
Closed captions
Mono audio
Full keyboard access
Tab order
Menu shortcuts
Simplify interface
Hide advanced options
Fullscreen mode
82
Bill Dudney
Application Technologies Evangelist
dudney@apple.com
Accessibility Mailing List
Public developer list
accessibility-dev@lists.apple.com
Documentation
http://developer.apple.com/wwdc
Apple Developer Forums
http://devforums.apple.com
More Information
83
Accessibility Web Page
www.apple.com/accessibility
84
Accessibility on iPhone OS Nob Hill
Wednesday 4:30PM
Related Sessions
85
OS X Accessibility Lab
Application Frameworks
Lab B
Tuesday 2:00PM
iPhone Accessibility Lab
Application Frameworks
Lab B
Thursday 9:00AM
Labs
86
87
88
89

Session 100 usable by everybody design principles for accessibility on mac os x