« Oleander Preparing for Spring | Main | InScript Release 188 »

Fri, Apr 07, 2006

Opera and Acid2 - and iCab?

More and more browsers pass the Acid2 test, this is good news! Now Opera 9 has passed the test, too, well before Firefox or Internet Explorer. Congratulations!

Less good news is this assertion that Konqueror and iCab fail to pass the test because they do not hide the document's scrollbars. Hiding the scrollbars is not strictly neccessary to pass the test, and therefore the inventors of the test awarded the second and third place of the "test race" to iCab and Konqueror, respectively (with Safari as the winner and Prince and Opera following on places four and five). Unfortunately, someone took this claim for true and changed the Acid2 history in Wikipedia... So it's time for a clarification why hiding the scrollbars is not necessary to pass the Acid2 test, and here it is:

The assertion is based on the following line from the test's CSS source code:

html { ... overflow: hidden; /* hides scrollbars on viewport, see 11.1.1:3 */ ... }

The comment explicitely references section 11.1.1 from the CSS 2.1 draft, let's have a look there:

This value indicates that the content is clipped and that no scrolling user interface should be provided to view the content outside the clipping region.

The important word here is "should", because the same document defines exactly what this word means (section 3.1):

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 (see [RFC2119]). However, for readability, these words do not appear in all uppercase letters in this specification.

Let's go on to RFC 2119:

This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

iCab's decision to display scrollbars is carefully weighed and has a simple reason - usability. There are pages out there where "webdesigners" assume a certain screen size, and if iCab would hide the scrollbars as "desired", these pages would be unusable.

You might argue that the Acid2 test is about predictability of the layout, and you're right. But whether there are scrollbars on the viewport or not does not affect the layout of the Acid2 test at all, so the scrollbars are simply irrelevant for a predictable layout. And that's most probably the reason why WaSP declared iCab (and Konqueror) Acid2 compliant even with scrollbars on the viewport (i.e. on the document). For good reason: Acid2 is a test for a predictable layout, but not against usability.

Conclusion: Opera passes Acid2, as do Konqueror and iCab.

In the meantime, there have been different test cases that detach the scrollbar from the viewport via CSS, i.e. the document's scrollbar is not necessarily displayed on the border of the window (outside of the document's content). In these cases the layout might depend on the visibility of the scrollbars, so from iCab 3.0 Beta 400 on there is a switch to detach the scrollbars and hide them if the CSS rules say so. But this option is switched off by default - again, for usability reasons. And again, this is not relevant for Acid2, since it keeps the scrollbars attached to the window border.

And now, back to business.

Posted by Thomas Much at 23:54
Categories: Browsers, iCab & InScript