Combining WordPress and Flickr to make accessible books for beginning readers

| tags: motor impaired, programming, enabling technology, literacy

Tar Heel Reader is a web site designed to help teachers make easy-to-read books for children with disabilities. It has a growing selection of books to read and a simple process for creating new books using pictures found on Flickr.

These pages are from a typical book at the site.

At my birthday, I want balloons.At my birthday, I want a cake.At my birthday, I want some friends.At my birthday, I want candy.

My friends Karen Erickson and Gretchen Hanser of the Center for Literacy and Disability Studies tell me that children with limited ability to speak or handle traditional books have few opportunities to learn to read and write. While typically developing children have access to dozens or even hundreds of books, severely disabled kids often have access to very few. Imagine being fifteen years old, unable to speak or to reliably use your hands to manipulate a book and getting your first opportunity to read. Books about baby farm animals aren't going to cut it. You might be interested NASCAR, fashion, or spacecraft but beginner books on those subjects are rare and even more rarely accessible. Could we do something to make creating accessible books easier?

At the Tar Heel Reader site you can select a book and then advance through the pages with just about any of the characters commonly generated by switch interfaces (let me know if you need something not currently supported). You can have each page read out loud by a computer-generated voice if you wish. Also, each book is automatically available for download as a PowerPoint, Impress, or Flash show.

If you don't find a book to suit your reader's interest, making a new book is very easy. The book creator wizard guides you through the process of finding pictures on Flickr, and providing a simple sentence to go with each. Then, with the click of a button, you can create a new book that will immediately be available for reading or download.

How it works

I started hacking PHP using the Flickr API and quickly had a primitive book creator wizard working. When I started thinking about all the supporting infrastructure I would need to provide logins, searches, and multiple authors, it hit me that WordPress already had everything I'd need. A blog post by Steve Winton encouraged me to examine the possibilities further. I'm very impressed with the ease of integrating the wizard and switch-accessible reading into WordPress by only hacking on the theme.

Book wizard I started with the default theme and hacked the css a bit to create more space on the page. Then I created an empty page for the wizard and gave it a custom template containing my PHP code. Working within the page framework in this way gave me access to all the great WordPress functions while leaving me free to program the page however I wished. In the screen shot to the left you can see the wizard in use. The two rows of pictures at the top are the result of a Flickr search for the tag squirrels. The two boxes near the bottom are the pages constructed so far with an area in each for the short sentence for that page. I used the cool Hoverbox Image Gallery css to make the Flickr search images zoom when you move your cursor over them.

The wizard would be much cooler if it used AJAX but the current version is simply a single html form that does a POST to the page URL. At the very top of the code I call the WordPress auth_redirect function to make sure the author is logged in. Then I check to see if the request method is GET or POST. A GET request signals starting to write; all other calls will use method POST. I used the phpFlickr class to manage access to Flickr. When the author has completed the book, pressing the Create my book button uses the WordPress wp_insert_post function to create post representing the book and then redirects the browser to the newly created post.

Each book is simply a multi-page post using the WordPress <!--nextpage--> tag. They have a regular structure that allows me to parse them with a regular expression when invoking the wizard for editing a book. I customized the book display by modifying the single.php file to make a singlebook.php file that is used for posts in the Book category. The singlebook template eliminates the sidebar and other navigation to unclutter the layout. Switch enabling the reading is done with a bit of JavaScript that advances to the next page on a KeyPress event. Speech enabling the books is implemented with a Python CGI script that uses pyibmtts to convert the caption to a Flash movie that is embedded in the page.

Teachers sometimes use slide show tools such as PowerPoint to make accessible books for their disabled students. To support this and to allow reading books offline each book may be downloaded in Microsoft PowerPoint, OpenOffice Impress, and Adobe Flash format. I generate the Impress format XML using the PHP DOM functions and then convert to PowerPoint and/or Flash using soffice running as a server with the PyODConverter as described in another post.

Future directions

The book on Jeff Gordon illustrates a possible future direction for these books. I used the built-in WordPress editor to modify the last page to include a YouTube video instead of a static picture. I think we could extend the wizard to include YouTube searches if there is enough interest.

Karen suggested including sentence frames to encourage authors to create easy to read texts. I didn't understand her well enough to try to implement something. Hey, I'm just a computer guy!

Gretchen would like a way to make whatever book the class is currently reading available in this format. I think we could do something with a web cam and a bit of uploading assistance.

Developing this prototype was both fun and educational for me. If we get enough interest from teachers perhaps I'll get a group of students to program an enhanced version this fall.