text resize and accessibility conundrum

mj-mpjdesign

New Member
Hi all

Hoping for some advice, of either technical or the client management type...

I'm working on a website redesign for a local government funded body - i.e. a public sector client who's website is used by general public, schools, business, councils, etc. They quite rightly want their redesigned site to be accessible and legally I believe they have to ensure it is.

One feature of their current site is a javascript powered text resizer, the sort with smaller and larger letter 'A' s which can be clicked to make the text smaller or larger. They want to retain this facility in the redesigned site.

I've strongly suggested that the revised design uses a "Resize Text" link which links to a page similar to this one: Accessibility | The Wildlife Trusts because

a) we can't rely on all users having javascript enabled (especially in local government, schools and business)

b) educating people how to use their browser controls to resize text is a solution they can use on many other websites.

(Obviously the text sizes will be specified in in the css with em units for the benefit of IE users.)

The client however insists they want to keep the current text resize functionality. So my questions are:

a) does anyone know of a css only or css+php method to resize text?
b) can anyone suggest a way of strengthening my argument to the client? - maybe there's an official/independent accessibility study or maybe it's actually illegal under UK disability law?

Any suggestions most appreciated - thanks!
 
Jaz was very keen on accessibility so he did a thread of accessible web coding. Unfortunately Jaz isn't around as much these days as he'd love this thread and you'd have a few essays to read from him lol.

His old thread is here and may be of some help
 
Glad to know I'm missed Levi. Who said you couldn't drive a guy to tears? :cry:

Check out the thread Levi quite rightly points to.

JavaScript text resizer, OMG who ever created that has no idea, diferent sizes of A's o dear lord please no. Think outside the box here.

a) we can't rely on all users having javascript enabled (especially in local government, schools and business)
No and if you do you have just made the site illegal, which the site owners can and do get prosacuted for. Websites in the UK and 27, at least, other countries have legislation that effect those websites can operate/work. UK sites fall under EU law and the 2010 equality act which says all content must be visable/readable to everyone. With or without JavaScript. JavaScript is only meant to enhance a website, not be it!! :mad:
b) educating people how to use their browser controls to resize text is a solution they can use on many other websites.
No! Most people don't care, again think outside the box here, your not teaching people to suck eggs your giving them the egg on the plate and letting them eat it. Acessibility is really an extention to useability and thus must be worked in as such.

Check point 7 from the above linked in thread. High contrast zoom style sheets done the Jazajay way. Far better form a useability point of view and if you get creative can come up with so many ways to implement it.

EU law now says any website built under the EU must also allow their sites to work without cookies, allow the user to turn them off, not via the browser, and clearly state what information is being saved. Personally don't get me started its a law similar to the odd fruit not being allowed to be sold because they are not how people expect them to look, yes that was actually a law until a year or 2 back for EU member countries, done by people who have no understanding of how that effects sites or how impossible sites would be to work with out them. But hay again you can get creative on how to accomplish this.

If you need to know any more give me a shout.
Will try and get round on the forum more, just work too much these days.

Jaz :)
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function text_size() {
document.getElementById("enlarge_this").style.fontSize = "20px";
}
</script>
<style type="text/css">
#enlarge_this {
font-size:15px;
}
</style>
</head>

<body>
<div id="my_text">
<p id="enlarge_this" onclick="text_size()">Why hello there</p>
</div>
</body>
</html>
 
Hi Levi,
The way that works is it will enlarge the area that is being clicked to 15px.

Acessibility wise just no! Pixels wont allow the user to scale it if they decide they want more than 15px. As it's in line lets add it in-line as we'll but lets go through a better techquie.

Try this [If you must]:

<a href="#None Javascript back up goes in here" onclick="document.getElementsByTagName('body')[0].style.fontSize='2em'">Enlarge the whole page</a>


CSS:
body{font-size:1em}

Everything then become doubled in size as long as all the text elements don't uyse Pixels and PTs think thats about it but there may be more I always use EM's as it scales if the user increases the height to accomadate them.

However it would be better to write it like this in a external file.

document.getElementsByTagName("a")[0].onclick=document.getElementsByTagName('body')[0].style.fontSize="2em";

Then make sure the first link in all the pages that referances this file is the page relative enlarger link.

That way we seperate the logic from the structure. Yes there are better ways but I don't have time to do that x-browser.

Hope it helps and good contribution Andy.

Jaz :)
 
Jaz. You explained the code you use, you shouldn't need to explain another posters code. I was commenting on the fact that there's basically a load of html up there with nothing else.... unless you understand html well enough it's a pointless post and only needed a line or two saying what it does for the less technical minded which for all they know it could break their site or even worse link it to something completely wrong for their needs when in fact it could be quite useful.
 
Back
Top