Christian Heilmann

Author Archive

And you thought your job was b**locks?

Thursday, January 12th, 2006

I just got greeted by this happy chap at the tube station:

Man collecting money for a cancer charity dressed like a giant scrotum

He collected donations for a male cancer research charity and I must say he has balls doing so dressed like this.

Can you imagine the interview? “You want me to go dressed as WHAT?”

Only in England, I love this place!

Accommodation idea for @media 2006

Wednesday, January 11th, 2006

I had some people complaining about the price for accommodation in London. Well, it is true, this city is bloody expensive, but if you are not too afraid to rough it a little, and you get together and book a room for more than one or two people the Generator Hostel at Russel Square is cheap and good to use.

12 people could share a room for £12.50 a night each for example.

I have a 6×1.5m balcony, in case you want to bring a sleeping bag.

Accessibility mistakes we have all done

Wednesday, January 11th, 2006

I am currently writing up my follow up article for my digital web article 10 reasons why clients don’t care about accessibility aptly named “Seven habits of projects who fail to deliver accessibility”.

In it I’ll be listing mistakes I have encountered and done which caused the final product to become less accessible than it could have been. Examples are taking all the accessibility responsibility away from the client and believing the product description of a CMS without really testing if it delivers what it promises.

What are the snags that you kept encountering in your products?

One I just had to suffer again is a company trying to cut down the amount of incoming emails by looping requests through an FAQ system that fails to help:

Dear Christian,
The following may help in answering your question:
No matches were found.
If this response did not answer your question, you can submit it now

No, it didn’t help me, and a clever system would not even bother showing this message.

Free Scott Adams ebook

Friday, January 6th, 2006

Andrews and McMeel are giving out a free PDF copy of Scott Adams’ book ‘God’s Debris’. Allegedly the real book was hard to market, but worked out well enough.

Scott Adams is most known for his Dilbert comics, but wrote some enjoyable full books, too. This one is not in the dilbert fashion, but a lot more philosophical, as hinted in the end of “Dilbert of the future”.

Styling submit buttons or using links to submit a form?

Tuesday, January 3rd, 2006

Common issues Sending Form data to the server can be achieved in several ways, all of them with their pros and cons. It is especially tricky to create a form that has to be accessible, look great and allow for internationalisation (i18n). This post discusses the different options and offers a JavaScript that works around most issues.

The most accessible and least pretty way to submit a form is via a submit button.

Pros:

  • they resize with the font settings
  • their text content is determined by the value attribute, therefore it is is easy to localise them

Contras:

  • You cannot style them consistently across browsers, and they cannot get rollover states 1

The other option is to use an input element with the type “image”, which enables you to use any image to submit the form

Pros:

  • You have total control over the look and feel

Contras:

  • Whilst applying a proper alternative text makes the images accessible to blind visitors, images don’t scale when the font size gets changed, which means they are not 100% accessible.
  • i18n can become a maintenance issue, as you need to create (or automatically generate via the backend) images for each language.

Together with JavaScript, text links can be used to submit a form.

Pros:

  • You have total control over the look and feel
  • Text links scale with the font settings
  • i18n is dead easy, as it is text content of the page, not even alternative text in attributes

Contras:

  • requires JavaScript to work

Putting them all together

If you use a small JavaScript to check the document for submit buttons and dynamically replacing them with text links, you’ll get the best of both worlds:

  • users without JavaScript will get normal submit buttons
  • users with JavaScript styled text links.

See the demonstration page and try it alternately with JavaScript on and off.

The script that replaces the submit buttons uses Unobtrusive JavaScript and allows you to define a special class to add to each of the replacement links. The links will also have the same ID as the original submit button and their value as text content.

Feel free to use it and report any issues/problems here.2

1 It is debateable if you should design your own form controls anyways, after all the users knows how forms looks in their environment and some browsers/operating systems offer rollover states for submit buttons.

2 One issue is that if you don’t have any submit or image button in the form you won’t be able to send the form by hitting the enter button on the keyboard. To counterwork this you might want to add another image button or alter the script to hide the submit buttons instead of replacing them.

[tags]webdevtrick[/tags]