diff --git a/core/components/tree/basenode.js b/core/components/tree/basenode.js index b39301d00..456cffde2 100644 --- a/core/components/tree/basenode.js +++ b/core/components/tree/basenode.js @@ -178,13 +178,7 @@ Blockly.tree.BaseNode.prototype.initAccessibility = function() { var img = this.getIconElement(); if (img) { - Blockly.utils.aria.setRole(img, - Blockly.utils.aria.Role.PRESENTATION + '1'); - } - var ei = this.getExpandIconElement(); - if (ei) { - Blockly.utils.aria.setRole(ei, - Blockly.utils.aria.Role.PRESENTATION + '2'); + Blockly.utils.aria.setRole(img, Blockly.utils.aria.Role.PRESENTATION); } var ce = this.getChildrenElement(); @@ -655,7 +649,6 @@ Blockly.tree.BaseNode.prototype.getRowDom = function() { row.setAttribute('class', this.getRowClassName()); row.setAttribute('style', style); - row.appendChild(this.getExpandIconDom()); row.appendChild(this.getIconDom()); row.appendChild(this.getLabelDom()); @@ -704,14 +697,6 @@ Blockly.tree.BaseNode.prototype.getCalculatedIconClass = function() { throw Error('unimplemented abstract method'); }; -/** - * @return {!Element} The source for the icon. - * @protected - */ -Blockly.tree.BaseNode.prototype.getExpandIconDom = function() { - return document.createElement('span'); -}; - /** * @return {string} The line style. * @protected @@ -754,22 +739,13 @@ Blockly.tree.BaseNode.prototype.getRowElement = function() { return el ? /** @type {Element} */ (el.firstChild) : null; }; -/** - * @return {Element} The expanded icon element. - * @protected - */ -Blockly.tree.BaseNode.prototype.getExpandIconElement = function() { - var el = this.getRowElement(); - return el ? /** @type {Element} */ (el.firstChild) : null; -}; - /** * @return {Element} The icon element. * @protected */ Blockly.tree.BaseNode.prototype.getIconElement = function() { var el = this.getRowElement(); - return el ? /** @type {Element} */ (el.childNodes[1]) : null; + return el ? /** @type {Element} */ (el.firstChild) : null; }; /** @@ -845,10 +821,6 @@ Blockly.tree.BaseNode.prototype.updateRow = function() { * @protected */ Blockly.tree.BaseNode.prototype.updateExpandIcon = function() { - var img = this.getExpandIconElement(); - if (img) { - img.className = this.config_.cssTreeIcon; - } var cel = this.getChildrenElement(); if (cel) { cel.style.backgroundPosition = this.getBackgroundPosition(); diff --git a/core/components/tree/treecontrol.js b/core/components/tree/treecontrol.js index df5d77f30..953435251 100644 --- a/core/components/tree/treecontrol.js +++ b/core/components/tree/treecontrol.js @@ -137,12 +137,6 @@ Blockly.tree.TreeControl.prototype.getIconElement = function() { return el ? /** @type {Element} */ (el.firstChild) : null; }; -/** @override */ -Blockly.tree.TreeControl.prototype.getExpandIconElement = function() { - // no expand icon for root element - return null; -}; - /** @override */ Blockly.tree.TreeControl.prototype.updateExpandIcon = function() { // no expand icon