Showing posts with label accessibility. Show all posts
Showing posts with label accessibility. Show all posts

Wednesday, April 22, 2009

Don't Leave Keyboarders in the Cold

A handy jQuery plugin to make it easier to play nice with the keyboard-centric folks and improve accessibility

This code assumes the definition of a 'keys' object that identifies keycodes by more readable names, such as keys = {space:32, enter:13};


    // make a new plugin that handles click + keypress,
    // assuming that hitting space or enter counts as a 'click'.
    $.fn.klik = function(f){
        return this.bind('click keypress', function(e){
            if(!e.keyCode || e.keyCode == keys.space || e.keyCode == keys.enter){
                return f.call(this, e);
            }
        });
    };

Wednesday, March 11, 2009

cufón - fonts for the people

cufón is a newish sifr [clone].

Just posting here for my ~ahem~, our future reference.

http://cufon.shoqolate.com/