A friend of mine was twittering about accessibility, which gave me the idea to write on how to do no-javascript friendly stylish controls such as check boxes, buttons, and radio buttons.
Because graphic designers care more about the look and site designers care more about accessibility and usability, it’s often the developers’ role to satisfy them both. So here are the tricks I use to make stylish controls look cool when JavaScript is activated, and usable when it is not.
Being mainly a PHP backend programmer, I hate to see the design cripple the code. Therefore, I always make sure that stylish and standard controls end up sending the same data to the server.
In this post, I cover buttons, check boxes and radio buttons, and provide a simple PHP helper that automatically generates the code. You might also want to check out the demo page to have an idea of what it looks like.
More …
Most web applications in this World 2.0 target international users distributed among many different timezones. It is pretty simple to ask the users what their timezone is when they registered to your site. This article aims to solve the case of unregistered users who you can’t ask in a usable way. The solution isn’t perfect, but it’s better than nothing.
In theory and technologically, we could determine what timezone the user is in by:
- Using a geo location database to guess their longitude and latitude, and then find the probable timezone from it ;
- Using JavaScript to read the user’s workstation clock and calculate the probable timezone from it. You can see a live demo here.
Geo location, while pretty simple nowadays with free databases floating around, leaves us with a problem: the free databases are often not good enough to pin point a precise longitude and latitude, which will cause garbage in and garbage out when trying to translate it to a timezone. Moreover, the non-free and precise databases are pretty expensive compared to the added value of timezone detection, and are most likely not worth buying just for this purpose.
More …
In case you didn’t stumble on this pretty neat list of CSS techniques, tips and tricks from Smashing Magazine, well here it is.
Here are a few good ones:
Enjoy!