Falcon, thanks for pushing a little on the accessibility issue. I'll see what I can do to get that fixed in the kit.
Meanwhile, for anyone and everyone who has been awaiting a new version of the JavaScript that creates and manipulates the IFRAME that masks off peek-a-boo <select> elements (etc.)... here is my latest draft of MenuAdapter.js. Feedback is welcome.
//////////// MenuAdapter.js from the JavaScript folder of the kit //////////////////
var hoverClass = "AspNet-Menu-Hover";
var topmostClass = "AspNet-Menu";
var iFramePadding = 4;
function Hover__AspNetMenu(element)
{
AddClass__CssFriendlyAdapters(element, hoverClass);
var isIE = (navigator.userAgent.indexOf("MSIE") >= 0);
if (isIE)
{
var child = element.firstChild;
while (child)
{
if (child.tagName == "UL")
{
var grandchild = child.firstChild;
while (grandchild)
{
if (grandchild.tagName == "LI")
{
if ((typeof(grandchild.iFrameFormElementMask) != "undefined") && (grandchild.iFrameFormElementMask != null))
{
grandchild.iFrameFormElementMask.style.display = "block";
grandchild.iFrameFormElementMask.style.width = grandchild.offsetWidth + (iFramePadding * 2);
grandchild.iFrameFormElementMask.style.height = grandchild.offsetHeight + (iFramePadding * 2);
}
}
grandchild = grandchild.nextSibling;
}
}
child = child.nextSibling;
}
}
}
function Unhover__AspNetMenu(element)
{
RemoveClass__CssFriendlyAdapters(element, hoverClass);
var isIE = (navigator.userAgent.indexOf("MSIE") >= 0);
if (isIE)
{
var child = element.firstChild;
while (child)
{
if (child.tagName == "UL")
{
var grandchild = child.firstChild;
while (grandchild)
{
if (grandchild.tagName == "LI")
{
if ((typeof(grandchild.iFrameFormElementMask) != "undefined") && (grandchild.iFrameFormElementMask != null))
{
grandchild.iFrameFormElementMask.style.display = "none";
}
}
grandchild = grandchild.nextSibling;
}
}
child = child.nextSibling;
}
}
}
function SetHover__AspNetMenu()
{
var isIE = (navigator.userAgent.indexOf("MSIE") >= 0);
var menus = document.getElementsByTagName("ul");
for (var i=0; i<menus.length; i++)
{
if(menus[i].className == topmostClass)
{
var items = menus[i].getElementsByTagName("li");
for (var k=0; k<items.length; k++)
{
items[k].onmouseover = function() { Hover__AspNetMenu(this); }
items[k].onmouseout = function() { Unhover__AspNetMenu(this); }
if (isIE && ((typeof(items[k].iFrameFormElementMask) == "undefined") || (items[k].iFrameFormElementMask == null)))
{
var iFrameFormElementMask = document.createElement("IFRAME");
iFrameFormElementMask.scrolling= "no";
iFrameFormElementMask.src = "about:blank";
iFrameFormElementMask.frameBorder = 0;
iFrameFormElementMask.style.display = "none";
iFrameFormElementMask.style.position = "absolute";
iFrameFormElementMask.style.top = -1 * iFramePadding;
iFrameFormElementMask.style.left = -1 * iFramePadding;
iFrameFormElementMask.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
items[k].insertBefore(iFrameFormElementMask, items[k].firstChild);
items[k].iFrameFormElementMask = iFrameFormElementMask;
}
}
}
}
}
window.onload = SetHover__AspNetMenu;