S5 and Incremental Rendering of Graphics
S5 is moving quickly – within the last few days, it has seen three revisions — the most important of which is seen in the 1.1a3 version with incremental display. If you aren’t aware, S5 provides a framework for creating well-structured and accessible presentation materials. We’ve been using Opera Show for our accessibility presentations at WATS.ca for the past year or so, but I was immediately attracted to S5 because of its cross-browser compatibility.
I decided to try S5 for a presentation I was giving last night, and I wanted a particular graphic to render incrementally. Here’s how I did it using the incremental display from the first alpha release to incorporate incremental rendering: S51.1a3.
A Preview
Before you see the code – I’ve posted a copy of the actual slide I used. See the demonstration slide deck.
For what it’s worth, I didn’t spend a lot of time reworking Eric’s templates. I changed a few colours and fonts and that is about it. (If you are interested, the full presentation is available as well: Web Accessibility and Usability: The Human Factor.)
In essence, I applied Dave Shea‘s CSS Sprites approach to create an ordered list of items to display incrementally, each with its own background image that is absolutely positioned on the screen. The slide starts with a “greyed out” version of the graphics and then changes them as the ordered list displays incrementally through the magic and goodness that is S5.
The end result is incremental display of the graphic components in the order that you want them to appear. In theory, you could use this strategy to place other graphics whereever you wanted them to appear. The only issue I’ve found so far with incremental rendering is that if you revisit a slide you’ve already viewed, the last item in the list is still considered the “current” one. Not really a big deal — it is the first time through where it really counts.
The HTML Code
- <ol id=”schematic” class=”inc”>
- <li id=”phil”>Philosophy</li>
- <li id=”imp”>Implementation</li>
- <li id=”aware”>Awareness</li>
- </ol>
The CSS
- ol#schematic {
- list-style-type: none;
- }
- ol#schematic li {
- display: inline;
- text-indent: -999px;
- }
- ol#schematic li#phil {
- position: absolute;
- left: 200px;
- top: 150px;
- width: 187px;
- height: 118px;
- background-image: url(../pix/philosophy_gr.gif);
- background-repeat: no-repeat;
- }
- ol#schematic li#aware {
- position: absolute;
- left: 400px;
- top: 150px;
- width: 187px;
- height: 118px;
- background-image: url(../pix/awareness_gr.gif);
- background-repeat: no-repeat;
- }
- ol#schematic li#imp {
- position: absolute;
- left: 600px;
- top: 150px;
- width: 187px;
- height: 118px;
- background-image: url(../pix/implementation_gr.gif);
- background-repeat: no-repeat;
- }
- ol#schematic li#phil.current {
- left: 200px;
- background-image: url(../pix/philosophy.gif);
- background-repeat: no-repeat;
- }
- ol#schematic li#aware.current {
- left: 400px;
- background-image: url(../pix/awareness.gif);
- background-repeat: no-repeat;
- }
- ol#schematic li#imp.current {
- left: 600px;
- background-image: url(../pix/implementation.gif);
- background-repeat: no-repeat;
- }
The Printable View
I also used the .handout
class to show the images in the printable version – it will display the ordered list, as well as the raw graphics themselves, and a definition list that explained my thoughts behind the diagram of how I saw the relationship fitting together. I could have used headings and paragraphs, but I felt the definition list more closely matched the structure that I was aiming to demonstrate with the graphic.
- <div class=”handout”>
- <img src=”./pix/philosophy.gif” alt=”” />
- <img src=”./pix/awareness.gif” alt=”” />
- <img src=”./pix/implementation.gif” alt=”” />
- <dl>
- <dt>Philosophy of Web Accessibility</dt>
- <dd>Part of this philosophy…</dd>
- <dt>Implementation of Techniques</dt>
- <dd>This encompasses best practices…</dd>
- <dt>Awareness</dt>
- <dd>Awareness serves as a bridge between…</dd>
- </dl>
- </div>
6 Responses
Comment by Jesse Rodgers — Nov 18 2004 @ 7:20 pm
Very cool. I am going to have to try this out for a couple presentations at our WaTiTis conference.
Comment by Small Paul — Nov 19 2004 @ 9:00 am
And just a day later, I believe the incremental rendering bug is fixed. Cracking!
Comment by Eric Meyer — Nov 19 2004 @ 11:49 am
Excellent work, Derek! I don’t know if the incremental-rendering fix will be what you want or not, but I think it’s consistent– it should “unspool” the incremental rendering if you back up to the slide, going from the last step to the first step. I’d like to include an adapted form of your technique in the testbed, if that’s okay, as part of a series of incremental graphic demonstrations.
Comment by Derek Featherstone — Nov 19 2004 @ 12:12 pm
It is kind of amazing how fast S5 is moving… Eric, it sounds like the incremental fix is the way I’d expect it to behave. And feel free to use whatever you need to for the testbed…
Comment by Isaac Lin — Apr 01 2005 @ 10:17 am
I came across the following link in another presentation on S5:
http://v1.boxofchocolates.ca/projects/s5-incremental-graphics/
I tried to find an associated article by visiting the following URL:
http://v1.boxofchocolates.ca/projects/
I got a message warning me about being a spammer, which included in part the following message (I have removed the IP address of the company I work for):
You purport to have come from (none) via an IP address of xx.xx.xx.xx. The URL you were requesting was /projects/.
Can you please email me and I will provide the details of the IP address? I would like to be able to read your web site from work if possible.
Comment by Jeff Smith — Nov 18 2004 @ 1:50 pm
Excellent implementation Derek. It’s amazing how much can be accomplished with CSS. I wish that this know-how had been around when I was making presentations back in university, I would have gladly used S5 over Powerpoint any day.