All:
A community is forming around the so-called "Firebug Accessibility Dashboard" work and some of those involved were on a call the other day in which I took an action item to write our Eclipse Accessibility Tools Framework (ACTF) rules (now expressed as a combination of XML and JavaScript) in JSON. I am CCing the free aria group since that is where we decided to host the FAD discussions for now and responding to this particular note since the YSlow approach is similar to what I have put together.
Briefly, ACTF works from within Eclipse and "attaches" itself directly to the SWT Mozilla browser widget. Currently, a validation is triggered either when a document is loaded or when a DOMNodeInserted or DOMAttrModified event takes place. (We plan to expand validation-triggers and make these user-configurable in future releases.) The rules against which validations take place are written in XML and JavaScript. I have attached relevant files for web accessibility validation based on the IBM Web Accessibility Checklist v3.5 (which is based on WCAG 1.0):
http://www.ibm.com/able/guidelines/web/accessweb.html
I have included only relevant parts of the XML markup for the rules that I have encoded in JSON. The first rule is the standard check for alt tags on images (but is somewhat flawed since it does not allow alt=""). The second set of rules is for INPUT elements. The first checks to see that an alt tag is present for type="image" INPUT elements and the second checks to see that, for each INPUT element, a LABEL element is present with a for attribute pointing to the id of that INPUT element. Notice that the nodes that are examined must have tag names ("nodeNames" in ACTF parlance) that match the top-level tag names in the XML markup. We are working on ways to express other types of "criteria" such as attribute value matches or criteria that check the textual content of elements. The point is that the nodes to be selected for testing are selected by the engine and specified in the markup itself.
(See attached file: actf_web_accessibility_exerpt.xml)(See attached file: mozdom_validation.js)
Here is the JSON description of the same rules (which, of course, is not strictly JSON since JSON does not suppport functions but you get the idea).
(See attached file: sample_actf_rules-json.txt)
Notice that these rules could be registered to the YSlow engine with little modification. In particular, each rule in the arrays that correspond to a particular tag/node name would be registered, the definition of the validate function would need to be rewritten, and the function's logic would need to do node selection on its own. Since the ACTF validation engine would select nodes and rules appropriate for those nodes, no such logic is in the validate function. It is assumed that the element is of the type specified in the key (e.g. 'img', 'input'). Also, we are assuming (like YSlow) that these rules are invoked when the document is loaded but I could easily imagine other rulesets being invoked on the firing of other events. (Processing such a file is not a part of the engine at this time; my only intent is to show how the rules could be written in JSON-like notation.)
Two advantages to this approach over our current method of describing rules:
1. more familiar and readable than the rather cryptic markup we've put together for ACTF validation documents; also, because ACTF currently relies heavily upon the Java Reflection API to process validation documents, the validation document author/editor must have some knowledge of the underlying Java API that is being used (e.g. for web accessibility, its Java XPCOM)
2. in this form, rules could be directly injected into the browser; for instance, for the file, above, we could attach the execution of these rules directly to the onload event, which is (I assume) what YSlow does; the engine would still be present, but it would not execute the rules
Please feel free to ask questions - I know that this is probably an eye-full at first glance.
--> Mike Squillace
IBM Human Ability and Accessibility Center
Accessibility Tools Framework (ACTF) co-technical lead
http://www.eclipse.org/actf
W:512.286.8694
M:512.970.0066
External: http://www.ibm.com/able
Internal: http://w3.ibm.com/able
Aaron M Leventhal/Cambridge/IBM
11/18/2008 07:29 AM |
|
From: | "Victor Tsaran" <vts...@yahoo-inc.com> |
To: | "Stoyan Stefanov" <sto...@yahoo-inc.com>, "Jon Gunderson" <jon...@illinois.edu> |
Cc: | Aaron M Leventhal/Cambridge/IBM@IBMUS, Richard Schwerdtfeger/Austin/IBM@IBMUS, "Sandy Foltz" <sfo...@gmail.com> |
Date: | 11/18/2008 02:18 AM |
Subject: | RE: YSlow rules for analyzing performance question |
I see no reason not to use both approaches, JSON and declarative markup or even others that folks might not yet have put forth. I just wanted to see what our ACTF rules might lok like encoded differently and discover if there were any initial impediments to doing so. I will look at validator.nu next week, as I now have a Windows build working with Henri's help.
--> Mike Squillace
IBM Human Ability and Accessibility Center
Accessibility Tools Framework (ACTF) co-technical lead
http://www.eclipse.org/actf
W:512.286.8694
M:512.970.0066
External: http://www.ibm.com/able
Internal: http://w3.ibm.com/able
Aaron Leventhal <aa...@moonset.net>
Sent by: free...@googlegroups.com 11/25/2008 08:15 AM
|
|