lots of ugly hacks, lots of tabindexes