Guidelines for Accessible Forms

In an age where user feedback and interaction has become so popular, accessible forms have become that much more important. Many sites have already embraced making their forms accessible, and done a pretty good job of it, but inevitably some will still lack that little extra something – as small as an inappropriately named label through to no accessible features at all.

1. Using label tags

Labels should always be used and include the for attribute (e.g. <label for="name">). The value used should match the id of the input field that the label is being used for:

<label for="name">Name</label> <input type="text" id="name">

Labels for inputs, select dropdowns and textareas should precede the input, though labels for radio buttons and checkboxes should follow the input, as follows:

<input type="checkbox" id="terms"> <label for="terms">Accept our terms & conditions</label>

WordPress: Hooking Into The Upload Action

While WordPress implements a really nice asynchronous upload function, it doesn’t really offer any simple way to manipulate the files before they’re actually stored in your uploads folder. There are multiple filters you can hook into after the file’s been uploaded and processed; but there aren’t any filters available to do anything with the file beforehand.

Massive Privacy Breach

By now, chances are pretty good that you’ve received at least one e-mail message from some company informing you that your personal data (specifically your e-mail address) has been compromised in some way, as a result of a data breach at Epsilon.

So far, I have only received notification from Target, but I’ve heard reports that data from Amazon, Best Buy, Chase, Citi and many more major corporate entities was compromised.

Apparently, Epsilon is responsible for distributing most of the e-mail communications sent out by many, many different major corporations, so, if you’re signed up on anyone’s e-mail list, chances are pretty good that your e-mail address was harvested from Epsilon. Following is the communique I received from Target today.

WordPress: Optional Widget Areas

When developing a new WordPress theme, sometimes you might need to create optional widget areas within the template; that is, areas that can include widgets if the user wants, but don’t appear at all if the user has not added any widgets to that particular area.

For instance, some users of your theme might want to include a tag cloud above the footer; or maybe they want to include Google AdSense ads above the content. Other users of your theme might not want anything to appear in those areas, though.

So how do you create an optional widget area in a WordPress theme? The simple answer is, you use the is_active_sidebar() function.

WordPress: Checkbox, Radio and Select Helper Functions

As you may or may not know, WordPress has two simple helper functions built into it that make it easy to determine whether a checkbox/radio button should be checked or a select option should be selected.

Twitoaster Has Been Unplugged

Last week on the official Twitoaster blog, it was announced that the service would be shutting down almost immediately (as of March 20). Sadly, I have used the Twitoaster plugin on multiple WordPress installations because of its ease of use. It was  great tool allowing WordPress posts to be pushed to Twitter automatically, and came with the added benefit of tracking when a blog post was tweeted (it even went as far as to allow you to automatically publish those tweets as comments on your posts).