IE6 Transparent PNG Backgrounds…With Repeat and Positioning?!

It’s brand-spankin’ new and I haven’t tried it myself — so caveat emptor — but Drew Diller has posted a JS widget he calls DD_belatedPNG, which purports to not only get IE6 to display both inline and background transparent PNGs correctly but to actually permit the use of the background-position and background-repeat CSS properties.  The latter is not possible using the MS-proprietary AlphaImageLoader filter, making this capability something of a holy grail for compatibility-conscious web devs.

What the thing does is dynamically grab the PNG it’s told to, then use an MS “behavior” to recreate it as a VML node, and then insert that VML node back into the document, replacing the original PNG.  Unlike AlphaImageLoader, VML honors all of the expected CSS properties.

One drawback is the script has to be explicitly told which element(s) to grab, though at least one can use standard CSS syntax. This makes implementations in, say, a CMS-driven environment more problematic.  But if the thing works reliably and without leaking like a sieve, it could restore a little sanity and flexibility until that glorious day when IE6 is finally staked through the heart and forgotten forever, amen.

WCAG 2.0 Moves to Proposed Recommendation Status

On Nov. 3, 2008, the W3C‘s Web Content Accessibility Guidelines (WCAG) Working Group published Web Content Accessibility Guidelines 2.0 as a Proposed Recommendation.

WCAG defines how to make Web sites, Web applications, and other Web content accessible to people with disabilities. “Proposed Recommendation” means that the technical material of WCAG 2.0 is complete and it has been implemented in real sites. This is the last step before WCAG 2.0 becomes the official standard.

The WCAG Working Group is welcoming final comments on WCAG 2.0 through 2 December 2008, less than a month away.

I highly recommend that every single person in the web business read this stuff carefully. If you have something constructive to contribute to the discussion, now is the time.

WCAG 2.0 will supersede WCAG 1.0, which has been the operative accessibility standard since 1999. There are some important changes to the standard that all coders, IAs, and designers should take note of, and it’s worth noting that there have been periods of considerable controversy during WCAG 2.0′s adoption process.
Current official working drafts of WCAG 2.0 primer documents:

Read the official announcement. Check the latest changes and status of WCAG 2.0.

Windows Vista! It’s Spook-erific!

Although just about a month old now, this news item just crossed the ol’ Brainpain today…

For Windows Vista Security, Microsoft Called in Pros

By Alec Klein and Ellen Nakashima
Washington Post
Tuesday, January 9, 2007

When Microsoft introduces its long-awaited Windows Vista operating system this month, it will have an unlikely partner to thank for making its flagship product safe and secure for millions of computer users across the world: the National Security Agency.

For the first time, the giant software maker is acknowledging the help of the secretive agency, better known for eavesdropping on foreign officials and, more recently, U.S. citizens as part of the Bush administration’s effort to combat terrorism. The agency said it has helped in the development of the security of Microsoft’s new operating system — the brains of a computer — to protect it from worms, Trojan horses and other insidious computer attackers.

“Our intention is to help everyone with security,” Tony W. Sager, the NSA’s chief of vulnerability analysis and operations group, said yesterday. [cough]

The NSA’s impact may be felt widely. Windows commands more than 90 percent of the worldwide market share in desktop operating systems, and Vista, which is set to be released to consumers Jan. 30, is expected to be used by more than 600 million computer users by 2010, according to Al Gillen, an analyst at market research firm International Data.

…”I kind of call it a Good Housekeeping seal” of approval, said Michael Cherry, a former Windows program manager who now analyzes the product for Directions on Microsoft, a firm that tracks the software maker. …

Yyyyeah. Duly noted.

Read the full article at the link above. Although…I would be remiss to not quote the following as well:

…Other software makers have turned to government agencies for security advice, including Apple, which makes the Mac OS X operating system. “We work with a number of U.S. government agencies on Mac OS X security and collaborated with the NSA on the Mac OS X security configuration guide,” said Apple spokesman Anuj Nayar in an e-mail.

Novell, which sells a Linux-based operating system, also works with government agencies on software security issues, spokesman Bruce Lowry said in an e-mail, “but we’re not in a position to go into specifics of the who, what, when types of questions.” …

IE6 and IE7, Side By Side

One of the banes of web developers’ existence is when a new version of Internet Explorer gets released. That’s because you can only run version of IE on your machine at a time, yet for some months after the release date the responsible web dev is obliged (sometime contractually) to build sites that work and look right proper in both the outgoing version and the new version. And those versions never, ever, ever work the same when it comes to client-side code.

In the past, one had to rely on kindly maniacs who managed to cobble together some sort of stand-alone approximation of the outgoing version that would run on a system running the current (new) version. There’s been a couple problems with that: there’s no real guarantee the fakey standalone really worked exactly like the IE version it was approximating (which is critical when coping with, say, CSS or DOM anomalies) and, perhaps more importantly, god only knows what the thing might do to your box. And nevermind worries about virii. Heavy sigh. Where I work, we’ve been leaning toward installing a local VMWare instance of Windows running IE6 just for this purpose. Less disaster-prone, perhaps, but no less a pain (not to say that VMWare doesn’t rock — it definitely does). And then there’s the OS licensing thing. MS is a little picky about that.

Well, after seven-ish years and 2 browsers versions of that nonsense, Microsoft has seen some kinda light and made available to the dev community an actual, gen-yoo-ine, sanctioned standalone of IE6. The catch? It’s still a Virtual PC image, but hey at least it’s sanctioned, right?

Anyway, get all the details from “IE6 and IE7 Running on a Single Machine” on the official IEBlog.

(Um…but is anyone else besides me slightly unnerved by an MS widget that “time-bombs” on April Fools Day? I’m just askin’.)

Thanks to B.F. for the refer.

PNG Color Gamma Issues in IE7, and a Workaround

IE7 finally has support for PNG transparency without having to use clunky, pain-in-the-butt proprietary filters. Huzzah. However, it’s not entirely smooth sailing with PNGs in that browser.

The latest SitePoint Tech Times newsletter has a worthwhile read about PNG’s native gamma correction trip and how it causes problems in IE7.

“PNG images,” SitePoint explains, “can also contain a gamma correction value, which is meant to represent the relative brightness of the display on which the image was created. In theory, the browser can use this value to display the image at the exact same brightness on another display.”

In practice, tain’t really so. The problem can come when trying to match color(s) in the PNGs to CSS colors, which of course have no gamma correction. Result: total, hopeless mismatch and a gnashing of teeth.

I first ran into this some months back with an older version of Safari. Photoshop’s “Save for Web” doesn’t give you the option of not saving gamma info, and despite spending the better part of a day at the time researching the issue I was not able to find a workaround. (Though Henri Sivonen’s “The Sad Story of PNG Gamma ‘Correction’” was most informative about the background.)

Since then, things have changed a little. Current versions of Safari, Firefox, and Opera all natively ignore any gamma data in PNGs. However, the brand-new IE7 honors the PNG spec strictly and parses the image’s gamma as instructed. Ironic, isn’t it? Also a major drag for web devs, since IE7 will be the majority browser in no time.

Thankfully, SitePoint’s newsletter refers us to a handy utility called TweakPNG that is free and open-source…though Windows-only (sorry). As SitePoint explains, “Simply drag a PNG to the program window and delete the ‘gAMA’ chunk from the list before saving the file. While you’re at it, you might as well delete the ‘tEXt’ chunk as well, to save a few extra bytes of file size by removing Adobe’s stamp on the file.”

For Mac, one has to resort to installing ImageMagick (which can sometimes be a bear to compile depending on the trip with libraries familiar to all Linux nerds) and running commands via the terminal (see the article for details).

Even with all of that you’ll be out of luck with Safari 1.x “which arbitrarily corrects PNG images even when they contain no gamma information.”

Do NOT Use Internet Explorer…For Now, At the Very Least

In case you haven’t heard, there is a grievous “Extremely Critical” security hole that affects IE 5, IE 6, and IE 7 betas prior to Beta 2 (just released concurrently with the MIX06 conference). This one is not something to be trifled with. If you are a regular IE user you are taking your life into your own hands and should immediately switch to Firefox for the time being, or at least consider one of the stop-gaps below. If you’re curious, here’s the relevant post at the Microsoft Security Response Center Blog.

The problem is with an IE-only JScript/JavaScript thing called createTextRange. The security hole permits evil bastards and their feckless henchmen to easily install keystroke capture programs and, oh, anything they want directly to your computer. No muss, no fuss — just living hell for you.

Since the bug was revealed late last week, hundreds of (obviously) disreputable sites are reported to have modified their code to take advantage of the security hole and install Evil Shit ™ to people’s computers. Microsoft says they are actively targetting such sites with legal action and what all to get them shut down or whatever, but no matter how dilligent they’re actually able to be it’s inevitably like bailing the Titanic with a teaspoon.

There are a couple 3rd-party (non official!!) fixes floating around out there, but latest word from Microsoft is they will likely not release a bug fix until April 11 — a full two weeks away. Be advised that using 3rd-party fixes may not quite plug the hole, can cause other unforeseen problems, and/or cause tomcat urine to magically appear all over your leg. Or they may totally do the trick. For their part, Microsoft warns “Some of these [3rd-party] solutions make modifications to Windows itself to bypass the attack vector of the vulnerability.” Anyway, caveat emptor, yo.

If you insist on using IE anyway, for godz sakes at least wade through IE’s Options and disable “Active Scripting” (aka JavaScript). That’s Tools > Internet Options > Security tab > Custom Level button > and scroll down almost to the bottom under Scripting and set Active Scripting to “Disable”. While you’re there, and just below that, set Allow Paste Operations Via Script to “Prompt” (if not “Disable”). You should prolly also scroll all the way to the top again and get paranoid with those ActiveX settings. OH, and definitely disable Java in IE for now. Once you’re done, click Apply, then click OK, and click OK again when you’re back to the Security tab. Whew! Oh yeah…then cross your fingers and wait two weeks for the fix.

Um…or just use Firefox in the meantime.

Oh yeah, and there’s a couple other major security holes in IE that were recently revealed, too. One of them involves how IE interacts with Java, and another involves what are called HTAs — MS-proprietary “HTML applications” that have full privileges on the box running them.

Man, coming hot on the heels of the Vista postponement and resulting shake-up of high-mucketies, this has been a bad couple weeks for Microsoft.

FireBug Ajax/DHTML Debugging Tool for Firefox

It’s brand-spankin’ new (and the developer owns up, calling it a “pre-pre-pre-alpha release”), but man the FireBug extension is right handy.

Some initial caveats:

Some users report the XMLHttpRequest Spy feature works fine when using the Prototype library but apparently maybe not so much when using roll-your-own XHR functions.

While the dev says FireBug “only shows you errors and log messages that came from the page you’re looking at,” I noticed today that is not necessarily so. I was working with pop-ups, so it could be this early version gets confused when dealing with child windows. I didn’t get all empirical with it, so your mileage may vary.

Getting Firefox to Play Nice with NTLM

If you like using Firefox and, say, your company intranet or perhaps (shudder) SharePoint at the same time, the annoying thing is having to login every bloody time you go to a new page.

One of my intepid coworkers dug up this simple solution from Patrick Cauldwell’s Blog:

It’s not at all obvious how to make it work, and it took me a few tries. You have to go to your Firefox address bar and type about:config. This will bring up the internal config editor, which allows you to set all kinds of properties that influence Firefox’s behavior. Look for the key called network.automatic-ntlm-auth.trusted-uris. Set that key’s value [Note: you have to double-click it] to a comma separated list of servers you want NTLM auth for. So if your internal SharePoint sites are on servers called Larry and Mo, use “larry,mo”. You can also add the same value to the key network.negotiate-auth.trusted-uris. It’s unclear to me if that second one is required, but I set it, and everything works. Now SharePoint works like a champ, and authenticates automatically.

Fwiw, for my company’s intranet, I only had to set the first key. But I don’t play with SharePoint unless I really have to.

The Firefox 1.0.7 Web Developer Toolbar Updating Chewing My Desk Blues

I lost a good couple hours to hair pulling and snarling, ultimately culminating in the effective demise of my install of Firefox 1.0.7. Word to the wise: do not update Chris Pederick’s damn-excellent Web Developer Toolbar to the latest 1.0 release if you’re using that version. You might have more luck if you completely uninstall the older version first…and then again maybe not, I dunno.

By all reports, Firefox 1.5 has no problems — but if you like to stay a little behind, say for testing purposes, beware.

All of this is a real shame since by all accounts the new version is mighty nice indeed (albeit with one or two slightly troubling-sounding Known Issues).

Here’s what happened to me. I clicked my little “you’ve got updates” icon and it merrily updated. When I closed then reopened Firefox, nothing was usable — I couldn’t type in the URL or search blanks, and I couldn’t access any of the browser menus, not even using keyboard shortcuts. The green “check for updates” icon was visible in an unusual spot and I could click that, but no joy there.

A visit to the toolbar’s official site revealed a prominent message saying those upgrading should uninstall first. D’oh! So why is the new version at the same download coordinates as the old, I asked no one in particular as I began to gnaw on my desk.

Aaanyway… The “solution” for Windows users is as follows:

1. Close Firefox. (Yes, that icon does still work, too.)
2. Fire up your command window (Start > Run and type cmd) and cd to \Program Files\Mozilla Firefox\
3. Run this command: firefox.exe -safe-mode (This starts Firefox in, you guessed it, safe mode.)
4. Go to Tools > Extensions.
5. Find Web Developer 1.0 and uninstall it.
6. Close Firefox. Then open it again.

This will restore you to most functionality and at least allow you to export your bookmarks and compile a list of extensions to replace if need be.

In my case, though, View Source was totally fubarred, producing only the (now) customary multi-pane view with a whole lot of nothing in it. To be fair, I dunno if this was due to something done by the Web Dev toolbar or some post-lobotomy clash with other extensions. But there it was n’t all the same.
(Hm… Come to think, I never tried to actually access a site at this stage. Bad QA on my part — sorry!)

So at that point I went and updated my copy of Firefox to 1.5 only to find that several of my beloved dev-friendly extensions were not compatible with it and were dead. Alas and alack!

But my woes were not ceasing to rain, brothers and sisters. When I then tried to install the Web Dev toolbar all I got was a “download error” of some sort. Prolly some permissions thing, tho maybe not. In any event, by that point I was pretty well beyond civil comportment and decided to leave bad enough alone. But not until I gave myself the sadistic pleasure of uninstalling Firefox altogether.

Hopefully a clean install will produce more joy for me. Fingers crossed…it’s kind of a professional imperative, doncha know. Meanwhile, my home copy of FF and all its extensions will remain as-is for a while longer yet.

Meanwhile, my public apologies to the esteemed Mr. Pederick for my rather snippy email earlier today. :-.  I must hasten to add that he replied very promptly (!!) and was kind enough to provided some helpful instructions.