Home | History | Annotate | Download | only in chromevox

Lines Matching refs:isControl

685 cvox.DomPredicates.formFieldPredicate=function(a){for(var b=0;b<a.length;b++)if(cvox.DomUtil.isControl(a[b]))return a[b];return null};cvox.DomPredicates.landmarkPredicate=function(a){for(var b=0;b<a.length;b++)if(cvox.AriaUtil.isLandmark(a[b]))return a[b];return null};cvox.DomPredicates.containsTagName_=function(a,b){for(var c=a.length;c--;)if(a[c].tagName==b)return a[c];return null};cvox.DomPredicates.mathPredicate=function(a){return cvox.DomUtil.findMathNodeInList(a)};
687 cvox.DomPredicates.controlPredicate=function(a){for(var b=0;b<a.length;b++)if(cvox.DomUtil.isControl(a[b])||a[b].getAttribute&&"link"==a[b].getAttribute("role")||"A"==a[b].tagName&&a[b].href)return a[b];return null};cvox.DomPredicates.captionPredicate=function(a){for(var b=0;b<a.length;b++)if("CAPTION"==a[b].tagName)return a[b];return null};
706 cvox.DomUtil.getName_=function(a,b,c,d){"undefined"===typeof b&&(b=!0);"undefined"===typeof c&&(c=!0);if(a.constructor==Text)return a.data;var e=cvox.DomUtil.getBaseLabel_(a,b,c);0==e.length&&cvox.DomUtil.isControl(a)&&(e=cvox.DomUtil.getNearestAncestorLabel_(a));0==e.length&&a.constructor==HTMLInputElement&&(e=cvox.DomUtil.getInputName_(a));return cvox.DomUtil.isInputTypeText(a)&&a.hasAttribute("placeholder")?(b=a.getAttribute("placeholder"),0<e.length?0<cvox.DomUtil.getValue(a).length?e:e+" with hint "+
708 cvox.DomUtil.getNameFromChildren=function(a,b,c){void 0==b&&(b=!0);for(var d="",e="",f=0;f<a.childNodes.length;f++){var g=a.childNodes[f],e=a.childNodes[f-1]||g;if(b||!cvox.DomUtil.isControl(g)){var h=cvox.DomUtil.isVisible(g,{checkAncestors:!1});if(c||h&&!cvox.AriaUtil.isHidden(g))e="SPAN"==e.tagName||"SPAN"==g.tagName||"SPAN"==g.parentNode.tagName?"":" ",d+=e+cvox.DomUtil.getName(g,!0,b)}}return d};
711 cvox.DomUtil.getControlLabelHeuristics=function(a){if(a.hasAttribute&&(a.hasAttribute("aria-label")&&""==a.getAttribute("aria-label")||a.hasAttribute("aria-title")&&""==a.getAttribute("aria-title")))return"";for(var b=cvox.DomUtil.previousLeafNode(a),c=0;b&&(!cvox.DomUtil.hasContent(b)||cvox.DomUtil.isControl(b));)b=cvox.DomUtil.previousLeafNode(b),c++;for(var c=cvox.DomUtil.directedNextLeafNode(a),d=0;c&&(!cvox.DomUtil.hasContent(c)||cvox.DomUtil.isControl(c));)c=cvox.DomUtil.directedNextLeafNode(c),
717 cvox.DomUtil.hasContent=function(a){if(8==a.nodeType||cvox.DomUtil.isDescendantOf(a,"HEAD")||cvox.DomUtil.isDescendantOf(a,"SCRIPT")||cvox.DomUtil.isDescendantOf(a,"NOSCRIPT")||cvox.DomUtil.isDescendantOf(a,"NOEMBED")||cvox.DomUtil.isDescendantOf(a,"STYLE")||!cvox.DomUtil.isVisible(a)||cvox.AriaUtil.isHidden(a))return!1;if(cvox.DomUtil.isControl(a)||cvox.DomUtil.isDescendantOf(a,"VIDEO")||cvox.DomUtil.isDescendantOf(a,"AUDIO")||"IFRAME"==a.tagName&&a.src&&0!=a.src.indexOf("javascript:"))return!0;
718 for(var b="button,input,select,textarea",c=a.parentElement;c&&"LABEL"!=c.tagName;)c=c.parentElement;if(c){var d=c.querySelector(b);if(c.hasAttribute("for")){if(c=c.getAttribute("for"),(c=document.getElementById(c))&&cvox.DomUtil.isControl(c)&&!d)return!1}else if(d)return!1}for(d=a.parentElement;d&&"LEGEND"!=d.tagName;)d=d.parentElement;if(d){for(c=d.parentElement;c&&"FIELDSET"!=c.tagName;)c=c.parentElement;d=c&&c.querySelector(b);if(c&&!d)return!1}if(cvox.DomPredicates.linkPredicate([a])||"TABLE"==
731 cvox.DomUtil.isInputTypeText=function(a){if(!a||a.constructor!=HTMLInputElement)return!1;switch(a.type){case "email":case "number":case "password":case "search":case "text":case "tel":case "url":case "":return!0;default:return!1}};cvox.DomUtil.isControl=function(a){if(cvox.AriaUtil.isControlWidget(a)&&cvox.DomUtil.isFocusable(a))return!0;if(a.tagName)switch(a.tagName){case "BUTTON":case "TEXTAREA":case "SELECT":return!0;case "INPUT":return"hidden"!=a.type}return a.isContentEditable?!0:!1};
732 cvox.DomUtil.isLeafLevelControl=function(a){return cvox.DomUtil.isControl(a)?!(cvox.AriaUtil.isCompositeControl(a)&&cvox.DomUtil.findFocusableDescendant(a)):!1};cvox.DomUtil.getSurroundingControl=function(a){var b=null;if(!cvox.DomUtil.isControl(a)&&a.hasAttribute&&a.hasAttribute("role"))for(b=a.parentElement;b&&!cvox.AriaUtil.isCompositeControl(b);)b=b.parentElement;return b};
1529 cvox.ChromeVoxUserCommands.isFocusedOnLinkControl_=function(){var a="A";return document.activeElement.tagName==a||cvox.DomUtil.isControl(document.activeElement)?!0:!1};cvox.ChromeVoxUserCommands.removeTabDummySpan=function(){var a=document.getElementById("ChromeVoxTabDummySpan");a&&document.activeElement!=a&&a.parentNode.removeChild(a)};cvox.ChromeVoxUserCommands.createTabDummySpan_=function(){var a=document.createElement("span");a.id="ChromeVoxTabDummySpan";a.tabIndex=-1;return a};