ᅠ
Where does accessibility plug into the graphical desktop stack?
Samuel Thibault
Slides & stuff on http://brl.thefreecat.org/
http://liberte0.org/
Outline
- Introduction to accessibility
- Story of an 'a'
- Input side
- Output side
Gnuplot
Gnuplot output with red and green curves
Color blindness: 8% male, 0.5% female
What is accessibility?
AKA a11y
Usable by people with specific needs
- Cognition (dyslexia, attention disorder, memory, ...)
See Accessibility HOWTOs
- Motor disability (Parkinson, ...)
“Handicap” depends on the situation
and is not necessarily permanent
Why making GUI accessible?
(when textmode seems so easier to make accessible)
- A lot of stuff is not available in textmode
- e.g. real javascript support
- Business applications
- Non-tech people need to get help from non-tech people around
Dedicated software?
- e.g. edbrowse, a blind-oriented editor/browser
- Generally a bad idea!
- Oriented to just one disability
- Lack of manpower
- e.g. Web browser
- javascript/flash/table/CSS support?
- e.g. An office suite
- MSOffice/OpenOffice compatibility?
- Disabled & non-disabled working together
- Better use the same software
- Better make existing applications accessible
Design principles
- Same software, made accessible
- Understand each other, get help, etc.
- Synchronized work
- Just alternate input/output
- Being able to work together
- Pervasive
- Shouldn't have to ask for software installation / configuration
Status in a few words
- Text mode is generally quite well accessible
- But not so well suited to beginners
- Gnome quite accessible
- Gnome 3 was however almost a restart-from-scratch
- We're late compared to the Windows world
- We started less than a dozen years ago
- They started a couple of decades ago
- We're Stone Age compared to the Apple world
- Really good and integrated support
Story of an 'a'
Input
This figure shows the 0x1e scancode emitted by the keyboard, transformed into
KEY_A=30 by atkbd, transferred to input, evdev, passed as an even to the X
server, shows input-evdev driver turns into 38=30+8, passed by the core to the X
client
Still a keycode
i.e. physical position
Input
This figure shows that the KeyPress(38) event is handled by the toolkit main
loop, which uses XKB to turn it into a KeySym(XK_a), passed to the toolkit
input, which turns it into its own input_signal(a) representation, passed to the
toolkit widget
XKB handles turning into keysym, i.e. keyboard cap
Widget eventually has some behavior, e.g. append to text
Output
This shows that the widget passes text to text rendering such as pango to get
a pixmap, which is passed to the X server, whose video driver pushes it to the
video card, eventually shown on the screen.
Pixmap very early!
Not necessarily a screen, actually...
Accessibility in input
Versatility FTW!
Some people can only use
- A keyboard
- Keyboard shortcuts, move mouse with it, ...
- A joystick
- A mouse or a button
- Use it on a virtual keyboard
- ...
Keyboard layouts
- One-hand?
- Would need to move the hand a lot
- Toggle to “mirror” the keyboard layout
- This shows a keyboard with its keyboard layout mirrored horizontally
- Not sure where to implement it,
and layout details
AccessX
Basically fine-tuning
- StickyKeys: modifiers get sticky
- MouseKeys: turn keyboard into mouse
- SlowKeys: require key pressed for some time
- RepeatKeys: slow down repeat
- ToggleKeys: audio alert for toggles
- BounceKeys: delay between strokes
- E.g. Parkinson
Implemented in XKB in X server & X client
Virtual keyboard
This shows the xvkbd window, which is essentially a keyboard
Virtual keyboard
This shows the whole input stack, and an additional arrow shows that xvkbd
injects events between the X server and the X client
XTest injection
Braille keyboards
This shows the whole input stack, plus brltty which feeds uinput with evdev
events
Some braille devices have a classical PC keyboard
Braille keyboards
Others have a braille keyboard
- 8 keys for the 8 braille dots → 256 patterns
- Only a-z are world-standard, rest:
- Depends on the language
- ':' is not the same in English and in French!
- Depends on the country
- Depends on usage
- French braille revisited several times.
- VisioBraille devices have their own table.
- ...
Braille keyboards
But now we have a keysym, not a keycode
This shows the whole input stack, with the brltty daemon trying (and failing)
to insert a keysym into the X server, and xbrlapi trying (and failing) to insert
a keysym into the X client, and eventually xbrlapi using XKB to turn 'a' into
KeyPress(38), and push that to the X client.
- Have to backtranslate...
Typing 'A'
- Find case modifier
Typing 'ô'
- Find dead or
combining
accent
Remap hack, eww
PC Braille keyboard
Typing braille with the PC keyboard
PC keyboard with the asdf and jkl; keys highlighted as being braille keys.
- Turn into dots
- Then turn into text
PC Braille keyboard
Mere XKB layout + imLcFlt + Xcompose
This shows the input stack within the X client, KeyPress(41) being translated
by the layout into XK_braille_dot_1, which is filtered by imLcFlt into the
XK_braille_dots_1 pattern, which is turned into XK_a by XCompose before being
passed to the toolkit input engine.
Braille abbreviations
- “Grade 0” ~= integral ~= litteral
- One cell for each character
- 8bit charsets: a mere bijection
- A → ⠁, B → ⠃, C → ⠉, “ → ⠐, ...
- Unicode and several languages: ambiguity
- “Grade 1/2” ~= abbreviated ~= contracted
- Common language parts expressed with few cells
- Ambiguity
- “ation” is the same as “N”
PC Braille keyboard
Ibus daemon
This shows the X client input stack where the ibus module gets KeyPress(41),
passes it to the ibus-sharada-braille daemon, which turns it into XK_a, passed
to the toolkit input engine
How about wayland?
- Is it passing keycodes, keysyms, something else?
- Ideally should allow synthesizing all of them.
- Opportunity to fix all of this?
Accessibility in output
Tinkering with the rendering
- Tweak DPI to get bigger icons & fonts & such
- Xrandr panning support for basic zoom
- Gamma tuning & color inversion
- Screen mirror (!)
- TODO: Gtk3 “perfect” magnification
- Widget requested to render in a bigger pixmap
But for blind people?
And a lot other accessibility possibilities
- Don't try to patch rendering,
- Make applications expose their semantics instead
X accessibility, Mercator 1.0
Picture showing relations between xedit, Xserver and Mercator: text goes from
xedit to X server through Mercator
X accessibility, Mercator 1.0
Figure showing relations between gedit, X server and Mercator: now Mercator
gets pixmap, not text, because gedit uses gtk which uses pango to render
fonts
Generic methodology
Figure showing the relations between the standard application - abstract
representation - visual rendering, and the accessibility bus on which a registry
and a screen reader can connect, with an eventual rendering on an accessibility
device.
Story of an 'a', continued
This shows the X client output stack, whose toolkit widget emits a
text-changed signal for ATK, which turns it into a text-changed message over the
AT-SPI bus, received by Orca which renders it as braille or speech
But screen reader
also needs reading
I.e. browse the application content
This show orca sending a get_text message over the AT-SPI bus, received by
ATK, which calls get_text on the widget, which returns the text, which is passed
by ATK over the AT-SPI bus to orca, which renders it via braille or speech.
- Get text
- Get parent, children
- ...
Abstract representation
- Window
- Vertical container
- Menu bar
- Horizontal container
Technically speaking
- A lot of applications are already technically accessible
- Console
- GTK
- KDE-Qt4/5 (“Real Soon Now”)
- Acrobat Reader
- A lot are not
- KDE-Qt3
- Xt
- Self-drawn (e.g. xpdf)
In practice
- A lot of technically-accessible applications actually aren't really usable
- A visually-organized mess of widgets...
First name: Foo
Last name: Bar
Password : baz
In practice
- A lot of technically-accessible applications actually aren't really usable
- A visually-organized mess of widgets...
First column
- Label First Name
- Label Last Name
- Label Password
Second column
- Text Foo
- Text Bar
- Text baz
In practice
- A lot of technically-accessible applications actually aren't really usable
- A visually-organized mess of widgets...
- Label First Name for Text Foo
- Label Last Name for Text Bar
- Label Password for Text baz
In practice
- A lot of technically-accessible applications actually aren't really usable
- A visually-organized mess of widgets...
First column
- Label First Name
- Label Last Name
- Label Password
Second column
- Text Foo
- Text Bar
- Text baz
In practice
- A lot of technically-accessible applications actually aren't really usable
- A visually-organized mess of widgets...
First column
- Label First Name
- Label Last Name
- Label Password
Second column
- Text Foo
- Text Bar
- Text baz
- Screen reader “Script” for each application
Don't try to make applications accessible,
just make accessible applications
Quite often just a matter of
common sense from the start
Not a reason for not fixing
your existing apps of course,
it will just be a bit harder :)
Graphical applications
- Design your application without gui in mind first
- Logical order, just like CSS ☺
- Use standard widgets
- e.g. labeled text fields
- Avoid homemade widgets, or else implement atk yourself for them
- Always provide alternative textual content for visual content
- Keep it simple!
- Not only to make screen reading easier, but to make life easier for all users too!
Some pitfalls and advices
(from the accessibility howtos)
- Shouldn't have to use the mouse for anything
- Care of contrasts, configurable colors
- Avoid timing-based actions, or make them configurable
- No 2D organization, logical organization
- Keep it simple and obvious
- ...
Test it yourself! (GUIs)
Accerciser
Accerciser screenshot
Check that
the tree of
widgets looks
sane and is
complete
Documentations
- Accessibility HOWTOs
- Quite old, but still very useful advices
- Gnome Accessibility devel guide
Conclusion
- Accessibility has very diverse X needs
- Plug at various levels
- Needs various tweaks
- We need no regression there!
- Accessibility needs the semantics,
not just the rendering
- Separate form from content