May 3rd, 2010
I’ve always been a fan of flexible layout and trying to avoid introducing horizontal scrollbars whenever possible. Large content however poses an eternal conundrum: How to accommodate large content in tight spaces?
Some web designers like to lock a page design to a fixed width (or set a minimum width) forcing a horizontal scrollbar at lower resolutions for the entire site. This approach however does not accommodate some of the larger content types and I feel its a missed opportunity to maximise accessibility. A flexible layout allows your design to be adaptable and optimised for the device/resolution currently being used to view it.
I’ve been playing with some ideas that can be used in conjunction with any layout to accommodate wide content as easily as possible at lower resolutions.
With this example, trying resizing your browser window, make it fairly narrow.
- Large content such as tables should expose a horizontal scrollbar just below the table at low resolutions.
- Images will be scaled down to fit the width available automatically. Scaled images also gain the ability to zoom to full size on click (which also introduces a horizontal scrollbar for the image).
The code is not production ready yet (IE6 in particular needs work) but it should give you an idea of where it’s heading.
Let me know what you think!
- Posted in
- Accessibility, CSS, DHTML
- Tools
- 1 Comment
April 11th, 2010
Strong/clear focus highlighting for links and UI elements has great accessibility benefits, but it can also detract from the appeal of a site/application or distract users who are not used to this type of UI feedback. It is keyboard and alternate input device users that benefit most from strong/clear focus highlighting.

I’ve created a new jQuery plugin that allows you to style elements focused via keyboard navigation clearly while leaving elements focused via mouse events with default highlighting (or at least less dramatic highlighting).
This plugin takes the default behaviour of the Chrome browser (as of version 4) and replicates it across all browsers. Chrome gives strong yellow/orange highlighting to links/inputs that have received focus via the keyboard.
Let me know what you think? Is this useful to you? Is there a better way to make the distinction?
- Posted in
- Accessibility, DHTML
- Tools
- 2 Comments
April 5th, 2010
The last few weeks I’ve been trying to find ways to interact more easily with the Steam Community data that is exposed for all Groups and Users with public profiles. I was frustrated by the fact that Valve have not publicised an official API for interacting with this data and that the unofficial efforts failed to meet the scope I was looking for — not to mention being badly broken due to changes to the HTML of the target website.
My initial thought was to follow a model similar to this new project. But this approach leaves a number of common scraping problems unresolved:
- No caching. Each time data is required, the code will request the source HTML from the target URL
- Linear performance. Each time data is required, the code must process the HTML into API objects
- Relies on well-formed XML. If PHP’s SimpleXML extensions receives tag-soup the solution will fail
- Complex code to maintain. When the target website changes the structure of their HTML, it means a complete re-write of the majority of the API code
Enter the Reaper

To address these issues, I have been developing Reaper. Currently a PHP implementation that doesn’t require any extensions or external libraries. Reaper attempts to condense the common tasks of scraping into small blocks of efficient code and cache the results transparently for best performance:
- Reaper requests the URL (via YQL). HTML returned is tidied into well-formed XML and cached
- Reaper accepts your data definition array which maps data labels to XPath queries, RegEx expressions and/or callback functions to scrape the relevant data
- Reaper caches the resulting data object and returns it to you
There’s more work to do to improve error-handling and documentation, but so far I’m pretty pleased with the results.
Meanwhile, I’ve stumbled onto Steam Condenser, so I may not need to roll my own Steam Community API after all
I’m keen to hear suggestions and feedback, so let me know what you think as a comment, using the contact form or on Twitter.
- Posted in
- PHP
- Tools
- No Comments
March 22nd, 2010
I’ve been playing with WordPress for a fair while now. Hacking together themes, trying and modifying existing plugins, writing my own simple plugins from time to time. Generally doing too much in the theme files, and not enough abstraction into proper plugins.
Recently I’ve decided it’s time to bite the bullet and formalise some of these hacks, so I bring you my first two public WordPress plugins:
-
Plain vanilla WordPress provides a list of default avatars to choose from, but doesn’t allow you to choose an image of your own making. This plugin allows you to specify your own default avatar
-
This plugin allows you to specify icon(s) to be used when iPhone / iPod Touch users create a shortcut to your site using the ‘Add to Home Screen’ function in Safari
I hope you find these useful, and eventually I will think about submitting for inclusion in the Wordpress.org plugin directory. Before I do however, I’d appreciate any and all feedback, for example: any functionality limitations, plugin faux pas, coding style issues, etc…
Let me know what you think!
- Posted in
- PHP, WP Plugins, iPhone
- Tools
- No Comments