How to Beat IE TextSize Bug

  SimpleSimon1 09:42 24 Apr 2007


Having just built & deployed my first real mini-web site, I discovered that the browser TextSize function is working in Firefox but not in IE6 or IE7.

A quick bit of googling says this is a well-known bug whereby the TextSize function in IE (all versions) doesn't work if the page code defines any font sizes in pixels (which, of course, I did).

For accessability, I want this functionality working so it would appear that I have to define all font sizes either as percentage or ems. A bit of research says that, if I use ems, setting TextSize to "smaller" 'overshrinks' the associated text and although there are Javascript fixes for this, I don't want to go down this route unless I have to.

So, simple there any downside to expressing ALL my font sizes (including body) as percentage (or does anyone know a better way of dealing with this bug)?


  gibbs1984 19:36 24 Apr 2007

Don't know if there is a downside or not really but like you said there's JavaScript out there that can increase/decrease the text and it is easy to implement.

Personally I use pixels for font sizes and use the JavaScript to increase/decrease text.

  SimpleSimon1 09:02 25 Apr 2007

But, as I understand it, for people with accessibility issues, Javascript solutions don't always work. Consequently, I'd understood that, for true accessibility, Javascript solutions should not be relied on.

Any of the accessibility experts here (PurplePenny?) care to comment?


  gibbs1984 10:20 25 Apr 2007

How many people use the text increase/decrease option? (Wouldn't mind knowing myself)

Do you make the font that small that people can't read it, people with sight problems would generally have their resolution up high so they could see it better thus making the font larger. If they still couldn't see it then wouldn't that make it a design fault?

  SimpleSimon1 13:09 25 Apr 2007

The problem is that I'm trying to follow 'best (or, at least, reasonable) practice' for accessibility.

Now, I know nothing about the subject other than what I've read. However, in a couple of places I've seen comments that good accessibility practice is to not try and pre-judge what size font a user is comfortable with, but to set all body text to 100% and let them use the browser Text Size function to select whatever they feel happiest with.

Somewhere else I read that good accessibility practice frowns on the use of Javascript since some screen readers either don't support it or have problem with it.

I guess that was where I was coming from asking whether it was OK to set all font sizes to percentages, thereby fixing the IE bug

start with click here.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Alienware 17 R4 2017 review

These brilliant Lego posters show just what children's imaginations are capable of

Mac power user tips and hidden tricks

Comment réinitialiser votre PC, ordinateur portable ou tablette Windows ?