Disable Browsers' Text Enlargement Command

liunx

Guest
Hello. I was wondering if anyone knows a concrete solution to block a user from tampering with the text size of your webpage through that users' web browser commands?

Or, is this something that can not be overridden with basic programming?

Thanks much,

- Master00This is something you don't want to do (or even suggest!) There are accessibility issues here - users are able to increase the text size for good reasons - they may have sight problems - or just a small screen. You want to enable and empower people - not disable them. That's what the web's about. If you're scared of your layout breaking, then try to make a better, more flexible layout. For example, let's say you have a horizontal menu that is Xpx wide, it might break or look bad when the text-size is increased. what do you do to stop that? Use em instead - then the box will grow with the text and it won't drop to two lines or whatever you see as being the problem.

I hope this makes sense and you can think more about enabling than disabling users in the future.Thanks for the prospective, it makes perfect sense, and I do appreciate your post. That is something that I would consider, assuming it were a website which were to be offered publicly to an audience that could potentialy be offended by such a disablement. However, my client has specifically requested this alteration which I believe is because they will be posting printable information which must follow a precise company format which they don't want overridden.

Any information would be appreciated. ThanksYou could just make a printable version of said page as a .pdf, but it's worth pointing out that if they refuse a larger sized version on request then they are violating the Disability Discrimination Act (in the UK) and/or Section 508 (in the US)....which I believe is because they will be posting printable information which must follow a precise company format which they don't want overridden.
But changing the text size on the screen won't affect how it's printed!
If you don't want to make pdf files for printing (it's the most reliable format, but often seems like a bit of a pain as it takes Adobe Acrobat ages to open up) then you can make a print style sheet to format your page how you want for printing - either way, the text size on the screen won't affect how the page prints.?? I just tested this and changing the text size through the browser command does effect the way it prints on my computer.

I don't need a work-around, I need a script that will disable the browsers' text commands.You cannot do that. The standard practice, in situations like this, is to provide two documents: an accessible version in HTML and a "printer friendly" version in PDF.

The whole point of HTML is to provide information across different platforms. Presentation is secondary to the abilities and needs of the clients. On the other hand, the whole point of PDF is to suit the needs of control freaks.The client has minimum server space. They have a lot of documents and PDF's tend to take up a lot of space. It is not a public website, only a select few people will have the password to access the site. User satisfaction is irrelevant to this website.If you set the text size to a specific pt. size with CSS, the webBrowser can't change it. As was already mention though, this is not advisable. It discriminates against the visually impaired.If you set the text size to a specific pt. size with CSS, the webBrowser can't change it. Mine does so all the time. I have a lot of trouble reading small text and quite often enlarge the print. And I can set a minimum across all browsers.

The solution to your server space requires a little learning on your part. Properly mark up all of the pages in XHTML or even raw XML. Then you'll need to learn XSLT and XSL-FO. XSLT will allow you to define a style sheet that describes how each page is to be transformed into HTML. XSLT-FO will allow you to transform each page into several formats including PDF. You'll have to set up the server to run each page through a processor but the processors are free and available at <!-- m --><a class="postlink" href="http://xml.apache.org/">http://xml.apache.org/</a><!-- m --> .?? I just tested this and changing the text size through the browser command does effect the way it prints on my computer.

Sorry about that. I did test this notion before I posted and I was right - as far as I looked. I checked the print preview in Firefox when the text was huge and it looked normal. I forgot about IE - I often do. Goddamn piece of ....Yes, in FF if you select "always use my fonts, colors" then it will change the font to whatever you wish. For IE to affect font size, the CSS relative values must be used.I just found the setting in IE that allows this also. Ignore font sizes, in internet options>>general tab>>accessibility button. So no matter which major browser, if the user wishes, he can change the font, color, and the size.If you provide a separate media="print" stylsheet with font size set in pt the changes to font size user makes on screen will not affect how the document is printed.The web page author defines the web page content using HTML and proposes how they think it should look using CSS.

The visitor to the page chooses whether to use the author's CSS for the appearance of the page or alternatively can use their own CSS defined in their browser to override any layout specifications defined by the page author.All true, but as it turns out, his concern wasn't the webpage appearance in the browser, but rather when printed. Vladdy answered his concern.
 
Back
Top