[Laszlo-checkins] r14167 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/dhtml test/accessibility
hqm@openlaszlo.org
hqm at openlaszlo.org
Tue Jun 16 21:45:22 PDT 2009
Author: hqm
Date: 2009-06-16 21:45:19 -0700 (Tue, 16 Jun 2009)
New Revision: 14167
Added:
openlaszlo/trunk/test/accessibility/test-labels.lzx
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20090615-hqm-y by hqm at badtzmaru.home on 2009-06-15 15:21:30 EDT
in /Users/hqm/openlaszlo/trunk6
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: add preliminary <label> implementation to support DHTML accessibility
New Features:
Bugs Fixed: LPP-8248
Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ Implements LzSprite.setAADescription on DHTML sprite, by
adding a <LABEL> child element to the __LZdiv.
Tests:
test-labels.lzx manually check the DOM to verify that the innerHTML content of the <label> elements is correct
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-17 01:27:34 UTC (rev 14166)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-17 04:45:19 UTC (rev 14167)
@@ -17,6 +17,7 @@
this.constructor = arguments.callee;
this.owner = owner;
this.uid = LzSprite.prototype.uid++;
+ this.aadescriptionDiv = null;
if (isroot) {
this.isroot = true;
@@ -522,7 +523,7 @@
,opacity: true
,colortransform: false
,audio: false
- ,accessibility: false
+ ,accessibility: true
,htmlinputtext: false
,advancedfonts: false
,bitmapcaching: false
@@ -2385,3 +2386,47 @@
return null;
}
}
+
+/**
+ * Set accessibility description
+ * @param string s: Sets the accessibility name for this view
+ */
+LzSprite.prototype.setAADescription = function( s ) {
+ var aadiv = this.aadescriptionDiv;
+ if (aadiv == null) {
+ // If not already created, create a <label> element, nested in
+ // a <div style='display:none'> to make it invisible
+ this.aadescriptionDiv = aadiv = document.createElement('LABEL');
+ aadiv.style.display = "none";
+ // Safari reader only speaks labels which have a 'for' attribute
+ aadiv.setAttribute('for', this.__LZdiv.id);
+ this.__LZdiv.appendChild(aadiv);
+ }
+ aadiv.innerHTML = s;
+}
+
+
+/** Turns accessibility on/off if accessible == true and a screen reader is active
+ * @param Boolean accessible
+ */
+LzSprite.prototype.setAccessible = function(accessible) {
+ // Not yet implemented
+}
+
+
+/**
+ * Activate/inactivate children for accessibility
+ * @param Boolean s: If true, activate the current view and all of its children
+ */
+LzSprite.prototype.setAAActive = function( s ){
+ // Not yet implemented
+}
+
+/**
+ * Set accessibility silencing/unsilencing
+ * @param string s: If true, this view is made silent to the screen reader.
+ * If false, it is active to the screen reader.
+ */
+LzSprite.prototype.setAASilent = function( s ){
+ // Not yet implemented
+}
Added: openlaszlo/trunk/test/accessibility/test-labels.lzx
Property changes on: openlaszlo/trunk/test/accessibility/test-labels.lzx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
More information about the Laszlo-checkins
mailing list