Accessibility Minutes 2011 11 21
From MemberWiki
Present
- Jon Gunderson (University of Illinois - Co-Chair)
- Nicholas Hoyt (University of Illinois)
- David Todd (IBM) - scribe
- Marc Johlic (IBM)
- Philip Ackermann (Fraunhofer Institute for Applied Information Technology)
- Prasanna Bale (University of Illinois) (Scribe)
Minutes
[13:07] <david_> scribe today: david
[13:10] <david_> difference between ruleset 1 & ruleset 2: Set 1 based on context nodes and didn't scale very well. Now there's a DOM cache which is a collection of objects that represent the DOM.
[13:10] <jongund> /member/wiki/Accessibility_Ruleset_Rule_and_NLS_Format_2.0
[13:11] <david_> Above page has links to the set 2 files.
[13:11] <jongund> https://openajaxallianc.svn.sourceforge.net/svnroot/openajaxallianc/accessrules/version-2/trunk/openajax_a11y/scripts/cache_dom_traversal.js
[13:11] <david_> Above is the most important file.
[13:12] <david_> Above file defines the DOM cache object and contains the code for traversing the DOM.
[13:12] <david_> Code creates a copy of the DOM in memory.
[13:13] <david_> 2 parts: DOM element objects and DOM text nodes.
[13:14] <david_> 2nd pass goes through the DOM element cache.
[13:15] <david_> Caches can be generated on demand.
[13:16] <david_> Caches are reused by different rules.
[13:16] <jongund> https://openajaxallianc.svn.sourceforge.net/svnroot/openajaxallianc/accessrules/version-2/trunk/openajax_a11y/scripts/cache_images.js
[13:16] <david_> Above link is to the image cache.
[13:19] <david_> DOM element cache is the most complicated cache.
[13:21] <david_> Each node has rendered values for foreground and background color.
[13:22] <david_> Most rules look at the visibility property to determine if the rule applies.
[13:23] <jongund> OpenAjax.a11y.cache.ImagesCache = function (dom_cache) {
[13:23] <david_> Look at the cache images cache (link above) as good example to get started.
[13:23] <jongund> this.dom_cache = dom_cache;
[13:23] <jongund> this.image_elements = [];
[13:23] <jongund> this.sort_property = 'document_order';
[13:23] <jongund> this.up_to_date = false;
[13:23] <jongund> this.length = 0;
[13:27] <jongund> OpenAjax.a11y.cache.ImageElement = function (dom_element, base_url) {
[13:29] <jongund> if (!dom_element) return null;
[13:29] <jongund> var node = dom_element.node;
[13:29] <jongund>
[13:29] <jongund> this.dom_element = dom_element;
[13:29] <jongund> this.source = node.src;
[13:29] <jongund>
[13:29] <jongund> if (node.tag_name == 'area') {
[13:29] <jongund> this.source = node.href;
[13:29] <jongund> }
[13:30] <david_> Rule results get stored in the DOM element.
[13:36] <david_> Jon is developing test cases.
[13:36] <david_> Use database to keep track of rule bugs and issues.
[13:37] <jongund> if (this.dom_element.has_alt_attribute || this.dom_element.node.alt.length) {
[13:37] <jongund> this.has_alt = true;
[13:37] <jongund> this.alt = node.alt;
[13:37] <jongund> this.alt_length = this.alt.length;
[13:37] <jongund> this.alt_for_comparison = this.alt.trim().normalizeSpace().toLowerCase();
[13:37] <jongund> }
[13:37] <jongund> else {
[13:37] <jongund> this.has_alt = false;
[13:37] <jongund> this.alt = null;
[13:37] <jongund> this.alt_length = null;
[13:37] <jongund> this.alt_for_comparison = null;
[13:37] <jongund> }
[13:38] <david_> The alt attribute is always present.
[13:39] <david_> Discussing alt attribute checking.
[13:40] <david_> Does alt attribute have any content (see code above).
[13:41] <jongund> this.longdesc = node.getAttribute('longdesc');
[13:41] <jongund> if (this.longdesc) {
[13:41] <jongund> if (this.longdesc.indexOf('http:') == -1 ) {
[13:41] <jongund> this.longdesc = base_url + this.longdesc;
[13:41] <jongund> }
[13:41] <jongund> this.has_longdesc = true;
[13:41] <jongund> }
[13:41] <jongund> else {
[13:41] <jongund> this.has_longdesc = false;
[13:41] <jongund> this.longdesc = null;
[13:41] <jongund> }
[13:43] <jongund> https://openajaxallianc.svn.sourceforge.net/svnroot/openajaxallianc/accessrules/version-2/trunk/openajax_a11y/rules/rules_images.js
[13:43] <david_> Specialized caches collect information on things we want to test later.
[13:43] <jongund> { id : 'IMAGE_1',
[13:43] <jongund> lastUpdated : '2011-09-16',
[13:43] <jongund> cacheDependency : 'images_cache',
[13:43] <jongund> cacheProperties : ['alt', 'alt_length', 'dom_element:role', 'dom_element:computed_style:at'],
[13:43] <jongund> language : "",
[13:43] <jongund> enabled : true,
[13:43] <david_> Above link is to the images cache.
[13:43] <jongund> validateParams : {},
[13:43] <jongund> validate : function (dom_cache, rule_result) {
[13:44] <david_> Above code is an example of a rule.
[13:45] <david_> cacheDependency - rule may need to create additional caches.
[13:46] <david_> cacheProperties - what specialized features of an attribute do you want to know about?
[13:49] <david_> language - text string of language codes.
[13:49] <david_> enabled - false (engine won't process rule)
[13:49] <david_> validateParams - constants for rule
[13:50] <david_> validate - passes in the DOM cache; a rule can access any cache
[13:51] <david_> ruleResult object - holds which rules goes with particular requirements
[13:53] <jongund> var SEVERITY = OpenAjax.a11y.SEVERITY;
[13:53] <jongund> https://openajaxallianc.svn.sourceforge.net/svnroot/openajaxallianc/accessrules/version-2/trunk/openajax_a11y/openajax_a11y_constants.js
[13:53] <david_> Using integer constants rather than strings helps to speed up code.
[13:54] <jongund> OpenAjax.a11y.SEVERITY = OpenAjax.a11y.SEVERITY || {};
[13:54] <jongund> OpenAjax.a11y.SEVERITY.NA = 0;
[13:54] <jongund> OpenAjax.a11y.SEVERITY.PASS = 1;
[13:54] <jongund> OpenAjax.a11y.SEVERITY.VIOLATION = 2;
[13:54] <jongund> OpenAjax.a11y.SEVERITY.RECOMMENDATION = 3;
[13:54] <jongund> OpenAjax.a11y.SEVERITY.MANUAL_EVALUATION = 4;
[13:54] <jongund> OpenAjax.a11y.SEVERITY.WARNING = 5; // This is some type of coding inconsistency that may be related to accessibility
[13:54] <jongund> OpenAjax.a11y.SEVERITY.HIDDEN = 6; // Content is hidden and not tested for accessibility
[13:54] <jongund> OpenAjax.a11y.SEVERITY.INFORMATIONAL = 7;
[13:54] <jongund> OpenAjax.a11y.SEVERITY.NOT_EVALUATED = 8;
[13:58] <david_> OpenAjax.a11y.SEVERITY.NOT_EVALUATED - content can't be evaluated for some reason.
[13:59] <david_> What to do with NLS stuff?
[13:59] <jongund> OpenAjax.a11y.SOURCE = OpenAjax.a11y.SOURCE || {};
[13:59] <jongund> OpenAjax.a11y.SOURCE.NONE = 1;
[13:59] <jongund> OpenAjax.a11y.SOURCE.LABEL_REFERENCE = 2;
[13:59] <jongund> OpenAjax.a11y.SOURCE.LABEL_ENCAPSULATION = 3;
[13:59] <jongund> OpenAjax.a11y.SOURCE.TITLE_ATTRIBUTE = 4;
[13:59] <jongund> OpenAjax.a11y.SOURCE.VALUE_ATTRIBUTE = 5;
[13:59] <jongund> OpenAjax.a11y.SOURCE.ALT_ATTRIBUTE = 6;
[13:59] <jongund> OpenAjax.a11y.SOURCE.BUTTON_TYPE = 7;
[14:00] <jongund> OpenAjax.a11y.SOURCE.CHILD_TEXT_NODES = 8;
[14:00] <jongund> OpenAjax.a11y.SOURCE.ARIA_LABELLEDBY = 9;
[14:00] <jongund> OpenAjax.a11y.SOURCE.ARIA_LABEL = 10;
