Index: bridge/build.xml
===================================================================
--- bridge/build.xml	(revision 21617)
+++ bridge/build.xml	(working copy)
@@ -239,6 +239,7 @@
                 <file name="calendar.js"/>
                 <file name="treeNavigator.js"/>
                 <file name="select.js"/>
+                <file name="componentKeyboardNavigation.js"/>
             </filelist>
             <filelist dir="${build.dir}/component">
                 <file name="menu.js"/>
Index: bridge/lib/extras/componentKeyboardNavigation.js
===================================================================
--- bridge/lib/extras/componentKeyboardNavigation.js	(revision 0)
+++ bridge/lib/extras/componentKeyboardNavigation.js	(revision 0)
@@ -0,0 +1,368 @@
+Ice.PanelCollapsibleAccessKeyNavigator = Class.create();
+Ice.PanelCollapsibleAccessKeyNavigator = {
+    handleKeyDown : function (event, root) {
+        var kc  = event.keyCode;
+        var ctrlPressed = event.ctrlKey && !event.shiftKey && !event.altKey;
+        var ele = Event.element(event);
+        switch (kc) {
+            case Event.KEY_UP:
+                if (ctrlPressed) {
+                    if (this.moveToHeader(ele)) {
+                        Event.stop(event);
+                    }
+                } else {
+                    if (this.moveToPrevious(ele)) {
+                        Event.stop(event);
+                    }
+                }
+                break;
+            case Event.KEY_LEFT:
+                if (this.moveToPrevious(ele)) {
+                    Event.stop(event);
+                }
+                break;
+            case Event.KEY_RIGHT:
+            case Event.KEY_DOWN:
+                if (this.moveToNext(ele)) {
+                    Event.stop(event);
+                }                
+                break;
+            
+            case Event.KEY_RETURN:
+            case Event.KEY_SPACE:
+                if (ele.getAttribute("role") == "tab") {
+                    if( document.createEventObject ) {
+                        // If a Microsoft IE based browser implement this function
+                        var e = document.createEventObject("MouseEvent");
+                        ele.fireEvent( "onclick", e );
+                        Event.stop(event);
+                    
+                    } else {
+                        // If a web standards based browser implement this function
+                        var e = document.createEvent('MouseEvent');
+                        e.initEvent( 'click', true, true );
+                        ele.dispatchEvent( e );
+                        Event.stop(event);
+                    }
+                }
+                break;
+            case Event.KEY_HOME:
+                if (this.moveToFirst(root)) {
+                    Event.stop(event);
+                }
+                break;
+            case Event.KEY_END:
+                if (this.moveToLast(root)) {
+                    Event.stop(event);
+                }
+                break;
+            case Event.KEY_PAGEUP:
+                if (ctrlPressed) {
+                    if ((this.moveToPrevious (ele)) || (this.moveToPrevious(this.getHeaderElement(ele))) )
+                        Event.stop(event);
+                }
+                break;
+            case Event.KEY_PAGEDOWN:
+                if (ctrlPressed) {
+                    if ((this.moveToNext (ele)) || (this.moveToNext(this.getHeaderElement(ele))) )
+                        Event.stop(event);
+                }
+                break;
+        }
+    },
+
+    handleFocus : function (event, ele) {
+        ele.tabIndex = "0";
+        this.disableOthers (ele);
+    },
+
+    disableOthers: function (ele) {
+        if (ele.parentNode &&
+            ele.parentNode.parentNode &&
+            ele.parentNode.parentNode.parentNode) {
+
+            var parent = ele.parentNode.parentNode.parentNode;
+            for (i=0; i < parent.children.length; i++) {
+                var tmpEle = parent.children[i];
+                if (tmpEle.nodeType == Node.ELEMENT_NODE && tmpEle.children[0]) {
+                    tmpEle = tmpEle.children[0];
+                    if (tmpEle.nodeType == Node.ELEMENT_NODE && tmpEle.children[0]) {
+                        tmpEle = tmpEle.children[0];
+                        if (tmpEle.id != ele.id) {
+                            tmpEle.tabIndex = "-1";
+                        }
+                    }
+                }
+            }
+        }
+    },
+
+    moveToPrevious: function (ele) {
+        if (ele.getAttribute("role") == "tab") {
+            if (ele.parentNode.parentNode) {
+                var tmpEle = ele.parentNode.parentNode;
+                if (tmpEle)
+                    tmpEle = tmpEle.previousSibling;
+                while ((tmpEle != null) && (tmpEle.nodeType == Node.TEXT_NODE) )
+                    tmpEle = tmpEle.previousSibling;
+                if (tmpEle) {
+                    var preEle = tmpEle.children[0].children[0];
+                    if(preEle) {
+                        preEle.focus();
+                        return preEle;
+                    }
+                }
+            }
+        }
+        return null;
+    },
+
+    moveToNext: function (ele) {
+        if (ele.getAttribute("role") == "tab") {
+            var upEle = ele.parentNode.parentNode;
+            if (upEle) {
+                upEle = upEle.nextSibling;
+                while ( (upEle != null) &&(upEle.nodeType == Node.TEXT_NODE) )
+                    upEle = upEle.nextSibling;
+            }
+            if (upEle) {
+                var nextEle = upEle.children[0].children[0];
+                if(nextEle) {
+                    nextEle.focus();
+                    return nextEle;
+                }
+            }
+        }
+        return null;
+    },
+
+    moveToFirst: function (root) {
+        var tmpEle = root.children[0];
+        if (tmpEle.nodeType == Node.ELEMENT_NODE && tmpEle.children[0]) {
+            tmpEle = tmpEle.children[0];
+            if (tmpEle.nodeType == Node.ELEMENT_NODE && tmpEle.children[0]) {
+                tmpEle = tmpEle.children[0];
+                tmpEle.focus();
+                return tmpEle;
+            }
+        }
+        return null;
+    },
+
+    moveToLast: function (root) {
+        var tmpEle = root.children[root.children.length-1];
+        if (tmpEle.nodeType == Node.ELEMENT_NODE && tmpEle.children[0]) {
+            tmpEle = tmpEle.children[0];
+            if (tmpEle.nodeType == Node.ELEMENT_NODE && tmpEle.children[0]) {
+                tmpEle = tmpEle.children[0];
+                tmpEle.focus();
+                return tmpEle;
+            }
+        }
+        return null;
+    },
+
+    moveToHeader: function (ele) {
+        var tmpEle = this.getHeaderElement(ele);
+        if(tmpEle) {
+            tmpEle.focus();
+            return tmpEle;
+        }
+        return null;
+    },
+
+    getHeaderElement: function (ele) {
+        var tmpEle = ele.parentNode;
+
+        while( tmpEle && (tmpEle.getAttribute('role') != "tabpanel") ) {
+            tmpEle = tmpEle.parentNode;
+        }
+
+        if(tmpEle) {
+            var tabId = tmpEle.getAttribute("aria-labelledby");
+            if( tabId ) {
+                tmpEle = document.getElementById( tabId );
+                if (tmpEle) return tmpEle;
+            }
+        }
+        return null;
+    }
+}
+
+Ice.PanelTabKeyNavigator = Class.create();
+Ice.PanelTabKeyNavigator = {
+    handleKeyDown : function (event, root) {
+        var kc  = event.keyCode;
+        var ctrlPressed = event.ctrlKey && !event.shiftKey && !event.altKey;
+        var ele = Event.element(event);
+        switch (kc) {
+            case Event.KEY_UP:
+            case Event.KEY_LEFT:
+                if (this.moveToPrevious(ele)) {
+                    Event.stop(event);
+                }
+                break;
+            case Event.KEY_RIGHT:
+            case Event.KEY_DOWN:
+                if (this.moveToNext(ele)) {
+                    Event.stop(event);
+                }
+                break;
+            case Event.KEY_HOME:
+                if (this.moveToFirst(root)) {
+                    Event.stop(event);
+                }
+                break;
+            case Event.KEY_END:
+                if (this.moveToLast(root)) {
+                    Event.stop(event);
+                }
+                break;
+        //case Event.KEY_PAGEUP:
+        //    if (ctrlPressed) {
+        //        if ((this.moveToPrevious (ele)) || (this.moveToPrevious(this.getHeaderElement(ele))) )
+        //            Event.stop(event);
+        //    }
+        //    break;
+        //case Event.KEY_PAGEDOWN:
+        //    if (ctrlPressed) {
+        //        if ((this.moveToNext (ele)) || (this.moveToNext(this.getHeaderElement(ele))) )
+        //            Event.stop(event);
+        //    }
+        //    break;
+        }
+    },
+    
+    moveToPrevious: function (ele) {
+        if (ele.getAttribute("role") == "tab") {
+            while ((ele != null) && ((ele.parentNode).getAttribute("role") != "tablist"))
+                ele = ele.parentNode;
+            ele = ele.previousSibling;
+            while ((ele != null) && (ele.nodeType == Node.TEXT_NODE) )
+                ele = ele.previousSibling;
+
+            var lnk = this.findChild(ele, 'tab');
+
+            if (lnk) {
+                if( document.createEventObject ) {
+                    // If a Microsoft IE based browser implement this function
+                    var e = document.createEventObject("MouseEvent");
+                    lnk.fireEvent( "onclick", e );
+                    Event.stop(event);
+
+                } else {
+                    // If a web standards based browser implement this function
+                    var e = document.createEvent('MouseEvent');
+                    e.initEvent( 'click', true, true );
+                    lnk.dispatchEvent( e );
+                    Event.stop(event);
+                }
+                return lnk;
+            }
+        }
+        return null;
+    },
+
+    moveToNext: function (ele) {
+        if (ele.getAttribute("role") == "tab") {
+            while ((ele != null) && ((ele.parentNode).getAttribute("role") != "tablist"))
+                ele = ele.parentNode;
+            ele = ele.nextSibling;
+            while ((ele != null) && (ele.nodeType == Node.TEXT_NODE) )
+                ele = ele.nextSibling;
+
+            var lnk = this.findChild(ele, 'tab');
+
+            if (lnk) {
+                if( document.createEventObject ) {
+                    // If a Microsoft IE based browser implement this function
+                    var e = document.createEventObject("MouseEvent");
+                    lnk.fireEvent( "onclick", e );
+                    Event.stop(event);
+
+                } else {
+                    // If a web standards based browser implement this function
+                    var e = document.createEvent('MouseEvent');
+                    e.initEvent( 'click', true, true );
+                    lnk.dispatchEvent( e );
+                    Event.stop(event);
+                }
+                return lnk;
+            }
+        }
+        return null;
+    },
+
+    moveToFirst: function (ele) {
+        if (ele.getAttribute("role") == "tab") {
+            while ((ele != null) && ((ele.parentNode).getAttribute("role") != "tablist"))
+                ele = ele.parentNode;
+
+            ele = ele.parentNode.children[0];
+            var lnk = this.findChild(ele, 'tab');
+
+            if (lnk) {
+                if( document.createEventObject ) {
+                    // If a Microsoft IE based browser implement this function
+                    var e = document.createEventObject("MouseEvent");
+                    lnk.fireEvent( "onclick", e );
+                    Event.stop(event);
+
+                } else {
+                    // If a web standards based browser implement this function
+                    var e = document.createEvent('MouseEvent');
+                    e.initEvent( 'click', true, true );
+                    lnk.dispatchEvent( e );
+                    Event.stop(event);
+                }
+                return lnk;
+            }
+        }
+        return null;
+    },
+
+    moveToLast: function (ele) {
+        if (ele.getAttribute("role") == "tab") {
+            while ((ele != null) && ((ele.parentNode).getAttribute("role") != "tablist"))
+                ele = ele.parentNode;
+            ele = ele.parentNode.children[ele.parentNode.children.length-2];
+            var lnk = this.findChild(ele, 'tab');
+
+            if (lnk) {
+                if( document.createEventObject ) {
+                    // If a Microsoft IE based browser implement this function
+                    var e = document.createEventObject("MouseEvent");
+                    lnk.fireEvent( "onclick", e );
+                    Event.stop(event);
+
+                } else {
+                    // If a web standards based browser implement this function
+                    var e = document.createEvent('MouseEvent');
+                    e.initEvent( 'click', true, true );
+                    lnk.dispatchEvent( e );
+                    Event.stop(event);
+                }
+                return lnk;
+            }
+        }
+        return null;
+    },
+
+    findChild: function(ele, role) {
+        for (var i = 0; i < ele.children.length; i++) {
+            var child = ele.children[i];
+            if (child.nodeType != Node.TEXT_NODE) {
+                if (child.getAttribute("role") == 'tab') {
+                    return child;
+                }
+                else {
+                    var tmp = this.findChild (child, role);
+                    if (tmp)
+                        if (tmp.getAttribute("role") =='tab')
+                            return tmp;
+                }
+            }
+        }
+        return null;
+    }
+}
\ No newline at end of file
Index: component/src/com/icesoft/faces/component/paneltabset/PanelTab.java
===================================================================
--- component/src/com/icesoft/faces/component/paneltabset/PanelTab.java	(revision 21617)
+++ component/src/com/icesoft/faces/component/paneltabset/PanelTab.java	(working copy)
@@ -14,7 +14,7 @@
  * The Original Code is ICEfaces 1.5 open source software code, released
  * November 5, 2006. The Initial Developer of the Original Code is ICEsoft
  * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
- * 2004-2010 ICEsoft Technologies Canada, Corp. All Rights Reserved.
+ * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
  *
  * Contributor(s): _____________________.
  *
@@ -28,6 +28,7 @@
  * the notice and other provisions required by the LGPL License. If you do
  * not delete the provisions above, a recipient may use your version of
  * this file under either the MPL or the LGPL License."
+ *
  */
 /* Original Copyright
  * Copyright 2004 The Apache Software Foundation.
@@ -617,67 +618,6 @@
                false;
     }
 
-    /**
-     * @param domContext
-     * @param parent
-     * @param child
-     * @param tabSet
-     */
-    void addHeaderText(DOMContext domContext, Node parent, Node child,
-                       PanelTabSet tabSet) {
-        Element table = (Element) domContext.createElement(HTML.TABLE_ELEM);
-        table.setAttribute(HTML.CELLPADDING_ATTR,"0");
-        table.setAttribute(HTML.CELLSPACING_ATTR,"0");
-        Element tr = (Element) domContext.createElement(HTML.TR_ELEM);
-        Element labelTd = (Element) domContext.createElement(HTML.TD_ELEM);
-        table.appendChild(tr);
-        
-        Element div = (Element) domContext.createElement(HTML.DIV_ELEM);
-        parent.appendChild(div);
-        div.appendChild(table);
-        
-        if (getLabelWidth() != null) {
-            div.setAttribute(HTML.STYLE_ATTR, "width:"+getLabelWidth()+"px;overflow:hidden;");
-            
-            if (isLabelWrap()) {
-                labelTd.setAttribute(HTML.STYLE_ATTR, "white-space: normal;width:"+getLabelWidth()+"px;");
-                Element innerDiv = (Element) domContext.createElement(HTML.DIV_ELEM);
-                innerDiv.setAttribute(HTML.STYLE_ATTR, "max-width:"+getLabelWidth()+"px;text-align:left;");
-                labelTd.appendChild(innerDiv);
-                innerDiv.appendChild(child);
-            } else {
-                labelTd.appendChild(child);
-            }
-        } else {
-            labelTd.appendChild(child);
-        }
-
-        if (getIcon() == null) {
-            tr.appendChild(labelTd);
-            return;
-        }
-
-        Element iconTd = (Element) domContext.createElement(HTML.TD_ELEM);
-        Element icon = (Element) domContext.createElement(HTML.IMG_ELEM);
-        icon.setAttribute(HTML.SRC_ATTR, getIcon());
-        icon.setAttribute(HTML.BORDER_ATTR, "border");
-        iconTd.appendChild(icon);
-
-        String iconClass = CSS_DEFAULT.PANEL_TAB_HEADER_ICON_DEFAULT_CLASS;
-
-        if (isIconAlignRight()) {
-            tr.appendChild(labelTd);
-            tr.appendChild(iconTd);
-            iconClass += CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_RIGHT;
-        } else {
-            tr.appendChild(iconTd);
-            tr.appendChild(labelTd);
-            iconClass += CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_LEFT;
-        }
-        iconClass = Util.getQualifiedStyleClass(tabSet,iconClass);
-        icon.setAttribute(HTML.CLASS_ATTR, iconClass);
-    }
-
     String getTabOnClass(String placement) {
         return Util.getQualifiedStyleClass(this, 
                 CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_TABONCLASS +
Index: component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
===================================================================
--- component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java	(revision 21617)
+++ component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java	(working copy)
@@ -14,7 +14,7 @@
  * The Original Code is ICEfaces 1.5 open source software code, released
  * November 5, 2006. The Initial Developer of the Original Code is ICEsoft
  * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
- * 2004-2010 ICEsoft Technologies Canada, Corp. All Rights Reserved.
+ * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
  *
  * Contributor(s): _____________________.
  *
@@ -28,8 +28,8 @@
  * the notice and other provisions required by the LGPL License. If you do
  * not delete the provisions above, a recipient may use your version of
  * this file under either the MPL or the LGPL License."
+ *
  */
-
 package com.icesoft.faces.component.paneltabset;
 
 import com.icesoft.faces.component.CSS_DEFAULT;
@@ -42,6 +42,7 @@
 import com.icesoft.faces.renderkit.dom_html_basic.HTML;
 import com.icesoft.faces.util.CoreUtils;
 import com.icesoft.faces.util.DOMUtils;
+import com.icesoft.faces.component.ext.taglib.Util;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.w3c.dom.Element;
@@ -71,12 +72,10 @@
  * rendering PanelTabSet and PanelTab components.</p>
  */
 public class PanelTabSetRenderer
-        extends DomBasicRenderer
+        extends DomBasicRenderer {
+    // hidden field for the tab links
 
-{
-    // hidden field for the tab links
     private static final String HIDDEN_FIELD_NAME = "cl";
-
     private static final Log log = LogFactory.getLog(PanelTabSetRenderer.class);
     private static final String SPACER_IMG =
             "/xmlhttp/css/xp/css-images/spacer.gif";
@@ -99,7 +98,7 @@
      * @see javax.faces.render.Renderer#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
      */
     public void encodeChildren(FacesContext facescontext,
-                               UIComponent uicomponent) throws IOException {
+            UIComponent uicomponent) throws IOException {
     }
 
     /* (non-Javadoc)
@@ -111,7 +110,7 @@
         // get DOMContext using DOMContext static method getDOMContext
         DOMContext domContext =
                 DOMContext.attachDOMContext(facesContext, uiComponent);
-        PanelTabSet tabSet = (PanelTabSet) uiComponent;        
+        PanelTabSet tabSet = (PanelTabSet) uiComponent;
         // if the domContext has not been initialized
         // initialize it, create the Root Element
         if (!domContext.isInitialized()) {
@@ -119,13 +118,14 @@
             Element table = domContext.createElement(HTML.TABLE_ELEM);
             table.setAttribute(HTML.CELLPADDING_ATTR, "0");
             table.setAttribute(HTML.CELLSPACING_ATTR, "0");
+            table.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             table.setAttribute(HTML.ID_ATTR, tabSet.getClientIdForRootElement(facesContext));
             divWrapper.appendChild(table);
         }
 
         FormRenderer.addHiddenField(facesContext,
-                                    deriveCommonHiddenFieldName(
-                                            facesContext, uiComponent));
+                deriveCommonHiddenFieldName(
+                facesContext, uiComponent));
 
 
         String baseClass = tabSet.getStyleClass();
@@ -150,8 +150,8 @@
                 return;
             }
 
-            if (tabSet.getChildCount() > 1 ||
-                !(tabSet.getChildren().get(0) instanceof PanelTab)) {
+            if (tabSet.getChildCount() > 1
+                    || !(tabSet.getChildren().get(0) instanceof PanelTab)) {
                 if (log.isErrorEnabled()) {
                     log.error(
                             " TabbedPane::only one panelTab element allowed when using value atttibute");
@@ -159,25 +159,27 @@
                 return;
             }
         }
-        
+
         if (tabSet.getWidth() != null) {
             Element divWrapper = (Element) domContext.getRootNode();
-            divWrapper.setAttribute(HTML.STYLE_ATTR, "width:"+tabSet.getWidth()+"px;overflow:hidden;");
+            divWrapper.setAttribute(HTML.STYLE_ATTR, "width:" + tabSet.getWidth() + "px;overflow:hidden;");
         }
 
         // get table
         Element table = (Element) domContext.getRootNode().getFirstChild();
+        Element tbody = domContext.createElement(HTML.TBODY_ELEM);
+        tbody.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
+        table.appendChild(tbody);
         // render table pass thru attributes
         for (int i = 0; i < HTML.TABLE_PASSTHROUGH_ATTRIBUTES.length; i++) {
-            if (HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i]
-                    .equalsIgnoreCase("styleClass")) {
+            if (HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i].equalsIgnoreCase("styleClass")) {
                 renderAttribute(tabSet, table,
-                                HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i],
-                                HTML.CLASS_ATTR);
+                        HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i],
+                        HTML.CLASS_ATTR);
             } else {
                 renderAttribute(tabSet, table,
-                                HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i],
-                                HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i]);
+                        HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i],
+                        HTML.TABLE_PASSTHROUGH_ATTRIBUTES[i]);
             }
         }
         // ICE-2337
@@ -199,6 +201,7 @@
         DOMContext.removeChildrenByTagName(table, HTML.TR_ELEM);
         // create a new table row for the Tab Header Cell
         Element headerRow = domContext.createElement(HTML.TR_ELEM);
+        headerRow.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
 
         // Create Tab headers
         int tabIdx = 0;
@@ -214,8 +217,7 @@
         if (tabSet.getValue() != null) {
             tabList = (List) tabSet.getValue();
         }
-        if (tabSet.getTabPlacement()
-                .equalsIgnoreCase(PanelTabSet.TABPLACEMENT_BOTTOM)) {
+        if (tabSet.getTabPlacement().equalsIgnoreCase(PanelTabSet.TABPLACEMENT_BOTTOM)) {
 
             if (tabList != null) {
                 visibleTabCount = tabList.size();
@@ -238,24 +240,33 @@
             table.appendChild(contentRow);
             table.appendChild(headerRow);
             Element headerTd = domContext.createElement(HTML.TD_ELEM);
+            headerTd.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             headerRow.appendChild(headerTd);
             Element tabsTable = domContext.createElement(HTML.TABLE_ELEM);
+            tabsTable.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             tabsTable.setAttribute(HTML.CELLPADDING_ATTR, "0");
             tabsTable.setAttribute(HTML.CELLSPACING_ATTR, "0");
             headerTd.appendChild(tabsTable);
+            Element tabsTBody = domContext.createElement(HTML.TBODY_ELEM);
+            tabsTBody.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
+            tabsTable.appendChild(tabsTBody);
+
             Element tabsTableRow = domContext.createElement(HTML.TR_ELEM);
-            tabsTable.appendChild(tabsTableRow);
-            
+            tabsTableRow.setAttribute(HTML.ARIA_ROLE_ATTR, "tablist");
+            tabsTBody.appendChild(tabsTableRow);
+
             contentRow.setAttribute(HTML.HEIGHT_ATTR, "100%");
+            contentRow.setAttribute(HTML.ARIA_ROLE_ATTR, "tabpanel");
+            contentRow.setAttribute(HTML.ARIA_LABELLEDBY_ATTR, ClientIdPool.get(tabSet.getClientId(facesContext) + "ht" + selectedIndex));
             // call the writeTabCell method
             // pass in the new table row Element tr3
             writeTabCell(domContext,
-                         facesContext,
-                         tabSet,
-                         visibleTabCount,
-                         selectedIndex,
-                         contentRow,
-                         tabSet);
+                    facesContext,
+                    tabSet,
+                    visibleTabCount,
+                    selectedIndex,
+                    contentRow,
+                    tabSet);
             if (tabSet.getValue() != null) {
                 int rowIndex = tabSet.getFirst();
                 int rowsToBeDisplayed = tabSet.getRows();
@@ -263,8 +274,8 @@
                 tabSet.setRowIndex(rowIndex);
 
                 while (tabSet.isRowAvailable()) {
-                    if (rowsToBeDisplayed > 0 &&
-                        rowsDisplayed >= rowsToBeDisplayed) {
+                    if (rowsToBeDisplayed > 0
+                            && rowsDisplayed >= rowsToBeDisplayed) {
                         break;
                     }
 
@@ -277,13 +288,13 @@
                             // call the writeHeaderCell method
                             // pass in the new header table row Element
                             writeHeaderCell(domContext,
-                                            facesContext,
-                                            tabSet,
-                                            (PanelTab) child,
-                                            tabIdx,
-                                            tabIdx == selectedIndex,
-                                            ((PanelTab) child).isDisabled(),
-                                            tabsTableRow);
+                                    facesContext,
+                                    tabSet,
+                                    (PanelTab) child,
+                                    tabIdx,
+                                    tabIdx == selectedIndex,
+                                    ((PanelTab) child).isDisabled(),
+                                    tabsTableRow);
                             visibleTabCount++;
                         }
                         tabIdx++;
@@ -304,13 +315,13 @@
                             // call the writeHeaderCell method
                             // pass in the new header table row Element
                             writeHeaderCell(domContext,
-                                            facesContext,
-                                            tabSet,
-                                            (PanelTab) child,
-                                            tabIdx,
-                                            tabIdx == selectedIndex,
-                                            ((PanelTab) child).isDisabled(),
-                                            tabsTableRow);
+                                    facesContext,
+                                    tabSet,
+                                    (PanelTab) child,
+                                    tabIdx,
+                                    tabIdx == selectedIndex,
+                                    ((PanelTab) child).isDisabled(),
+                                    tabsTableRow);
                             visibleTabCount++;
                         }
                         tabIdx++;
@@ -322,6 +333,7 @@
             Element td = domContext.createElement(HTML.TD_ELEM);
             String className = tabSet.getSpacerClass();
             td.setAttribute(HTML.CLASS_ATTR, className);
+            td.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             Text text = domContext.createTextNode("&#160;");
             td.appendChild(text);
             // append the empty TextNode table data to our table row Element tr1
@@ -331,15 +343,21 @@
             domContext.stepOver();
 
         } else { // for now it's either Top or Bottom
-            table.appendChild(headerRow);
+            tbody.appendChild(headerRow);
             Element headerTd = domContext.createElement(HTML.TD_ELEM);
+            headerTd.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             headerRow.appendChild(headerTd);
             Element tabsTable = domContext.createElement(HTML.TABLE_ELEM);
+            tabsTable.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             tabsTable.setAttribute(HTML.CELLPADDING_ATTR, "0");
             tabsTable.setAttribute(HTML.CELLSPACING_ATTR, "0");
             headerTd.appendChild(tabsTable);
+            Element tabsTBody = domContext.createElement(HTML.TBODY_ELEM);
+            tabsTBody.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             Element tabsTableRow = domContext.createElement(HTML.TR_ELEM);
-            tabsTable.appendChild(tabsTableRow);
+            tabsTableRow.setAttribute(HTML.ARIA_ROLE_ATTR, "tablist");
+            tabsTable.appendChild(tabsTBody);
+            tabsTBody.appendChild(tabsTableRow);
             if (tabSet.getValue() != null) {
                 int rowIndex = tabSet.getFirst();
                 int rowsToBeDisplayed = tabSet.getRows();
@@ -347,8 +365,8 @@
                 tabSet.setRowIndex(rowIndex);
 
                 while (tabSet.isRowAvailable()) {
-                    if (rowsToBeDisplayed > 0 &&
-                        rowsDisplayed >= rowsToBeDisplayed) {
+                    if (rowsToBeDisplayed > 0
+                            && rowsDisplayed >= rowsToBeDisplayed) {
                         break;
                     }
 
@@ -360,13 +378,13 @@
                             // call the writeHeaderCell method
                             // pass in the new header table row Element
                             writeHeaderCell(domContext,
-                                            facesContext,
-                                            tabSet,
-                                            (PanelTab) child,
-                                            tabIdx,
-                                            tabIdx == selectedIndex,
-                                            ((PanelTab) child).isDisabled(),
-                                            tabsTableRow);
+                                    facesContext,
+                                    tabSet,
+                                    (PanelTab) child,
+                                    tabIdx,
+                                    tabIdx == selectedIndex,
+                                    ((PanelTab) child).isDisabled(),
+                                    tabsTableRow);
                             visibleTabCount++;
                         }
                         tabIdx++;
@@ -383,16 +401,16 @@
                     if (child instanceof PanelTab) {
                         if (child.isRendered()) {
                             // append the header table row Element to the table
-                                  // call the writeHeaderCell method
+                            // call the writeHeaderCell method
                             // pass in the new header table row Element
                             writeHeaderCell(domContext,
-                                            facesContext,
-                                            tabSet,
-                                            (PanelTab) child,
-                                            tabIdx,
-                                            tabIdx == selectedIndex,
-                                            ((PanelTab) child).isDisabled(),
-                                            tabsTableRow);
+                                    facesContext,
+                                    tabSet,
+                                    (PanelTab) child,
+                                    tabIdx,
+                                    tabIdx == selectedIndex,
+                                    ((PanelTab) child).isDisabled(),
+                                    tabsTableRow);
                             visibleTabCount++;
                         }
                         tabIdx++;
@@ -404,6 +422,7 @@
             Element td = domContext.createElement(HTML.TD_ELEM);
 
             String className = tabSet.getSpacerClass();
+            td.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
             td.setAttribute(HTML.CLASS_ATTR, className);
             Text text = domContext.createTextNode("&#160;");
 
@@ -415,17 +434,19 @@
             // create a new table row Element for the Tab Cells
             Element contentRow = domContext.createElement(HTML.TR_ELEM);
             contentRow.setAttribute(HTML.HEIGHT_ATTR, "100%");
+            contentRow.setAttribute(HTML.ARIA_ROLE_ATTR, "tabpanel");
+            contentRow.setAttribute(HTML.ARIA_LABELLEDBY_ATTR, ClientIdPool.get(tabSet.getClientId(facesContext) + "ht" + selectedIndex));
             // append the table row Element to the table
-            table.appendChild(contentRow);
+            tbody.appendChild(contentRow);
             // call the writeTabCell method
             // pass in the new table row Element tr3
             writeTabCell(domContext,
-                         facesContext,
-                         tabSet,
-                         visibleTabCount,
-                         selectedIndex,
-                         contentRow,
-                         tabSet);
+                    facesContext,
+                    tabSet,
+                    visibleTabCount,
+                    selectedIndex,
+                    contentRow,
+                    tabSet);
 
             // steps to the position where the next sibling should be rendered
             domContext.stepOver();
@@ -454,22 +475,22 @@
             UIComponent child =
                     getUIComponent((UIComponent) tabSet.getChildren().get(0));
             while (tabSet.isRowAvailable()) {
-                if (rowsToBeDisplayed > 0 &&
-                    rowsDisplayed >= rowsToBeDisplayed) {
+                if (rowsToBeDisplayed > 0
+                        && rowsDisplayed >= rowsToBeDisplayed) {
                     break;
                 }
                 if (child instanceof PanelTab) {
-                    paramName = tabSet.getClientId(facesContext) + "." + tabIdx;
-                    paramValue = (String) paramMap.get(paramName);
+                    paramName = tabSet.getClientId(facesContext) + "ht" + tabIdx;
+                    paramValue = (String) paramMap.get(paramName + "Clk");
                     if (paramValue != null && paramValue.length() > 0) {
                         int oldTabIdx = tabSet.getSelectedIndex();
                         tabSet.setSubmittedSelectedIndex(tabIdx);
                         tabSet.queueEvent(new TabChangeEvent(tabSet,
-                                                             oldTabIdx,
-                                                             tabIdx));
+                                oldTabIdx,
+                                tabIdx));
                         JavascriptContext.addJavascriptCall(facesContext,
-                                "document.getElementById('"+ paramName + "').focus();");
-                        
+                                "document.getElementById('" + paramName + "').focus();");
+
                         return;
                     }
                     tabIdx++;
@@ -485,17 +506,17 @@
                 UIComponent child =
                         getUIComponent((UIComponent) children.get(i));
                 if (child instanceof PanelTab) {
-                    paramName = tabSet.getClientId(facesContext) + "." + tabIdx;
-                    paramValue = (String) paramMap.get(paramName);
+                    paramName = tabSet.getClientId(facesContext) + "ht" + tabIdx;
+                    paramValue = (String) paramMap.get(paramName + "Clk");
                     if (paramValue != null && paramValue.length() > 0) {
                         int oldTabIdx = tabSet.getSelectedIndex();
                         tabSet.setSubmittedSelectedIndex(tabIdx);
                         tabSet.queueEvent(new TabChangeEvent(tabSet,
-                                                             oldTabIdx,
-                                                             tabIdx));
+                                oldTabIdx,
+                                tabIdx));
                         JavascriptContext.addJavascriptCall(facesContext,
-                                "document.getElementById('"+ paramName + "').focus();");
-                        
+                                "document.getElementById('" + paramName + "').focus();");
+
                         return;
                     }
                     tabIdx++;
@@ -520,24 +541,24 @@
      * @throws IOException
      */
     protected void writeHeaderCell(DOMContext domContext,
-                                   FacesContext facesContext,
-                                   PanelTabSet tabSet,
-                                   PanelTab tab,
-                                   int tabIndex,
-                                   boolean active,
-                                   boolean disabled,
-                                   Element tr)
+            FacesContext facesContext,
+            PanelTabSet tabSet,
+            PanelTab tab,
+            int tabIndex,
+            boolean active,
+            boolean disabled,
+            Element tr)
             throws IOException {
         String baseClass = tabSet.getStyleClass();
         // create a new table data Element using the DOMContext API
         Element td = domContext.createElement(HTML.TD_ELEM);
-        td.setAttribute(HTML.ID_ATTR,
-                        ClientIdPool.get(tabSet.getClientId(facesContext) + "ht" + tabIndex));
-        // append the td to the tr
+        td.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
         tr.appendChild(td);
 
         String styleClass = tab.getStyleClass();
 
+        String id = ClientIdPool.get(tabSet.getClientId(facesContext) + "ht" + tabIndex);
+
         String label = tab.getLabel();
 
         if (label == null || label.length() == 0) {
@@ -546,9 +567,14 @@
 
         label = DOMUtils.escapeAnsi(label);
 
+        Text labelNode = domContext.getDocument().createTextNode(label);
+        Element hiddenInput = domContext.createElement(HTML.INPUT_ELEM);
+        hiddenInput.setAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN);
+        hiddenInput.setAttribute(HTML.NAME_ATTR, id + "Clk");
+        td.appendChild(hiddenInput);
+
         String tabPlacement = "";
-        if (tabSet.getTabPlacement()
-                .equalsIgnoreCase(PanelTabSet.TABPLACEMENT_BOTTOM)) {
+        if (tabSet.getTabPlacement().equalsIgnoreCase(PanelTabSet.TABPLACEMENT_BOTTOM)) {
             tabPlacement = CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_BOTTOM;
             td.setAttribute(HTML.STYLE_ATTR, "vertical-align:top;");
         } else {
@@ -562,6 +588,7 @@
 
         table.setAttribute(HTML.CELLPADDING_ATTR, "0");
         table.setAttribute(HTML.CELLSPACING_ATTR, "0");
+        table.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
 
         // table will have 3 rows
         Element tr_top = domContext.createElement(HTML.TR_ELEM);
@@ -592,7 +619,7 @@
 
         UIComponent labelFacet = tab.getLabelFacet();
         String disableStyleClassSuffix;
-        
+
         if (disabled) {
             disableStyleClassSuffix = "-dis";
             if (labelFacet == null) {
@@ -608,56 +635,29 @@
         } else {
             disableStyleClassSuffix = "";
             // Build a command link
-            Element link = domContext.createElement(HTML.ANCHOR_ELEM);
-            String linkId = ClientIdPool.get(tabSet.getClientId(facesContext) + "." + tabIndex);
-            link.setAttribute(HTML.NAME_ATTR, linkId);
-            link.setAttribute(HTML.ID_ATTR, linkId);
-            link.setAttribute(HTML.HREF_ATTR, "javascript:;");
-            link.setAttribute(HTML.CLASS_ATTR, "icePnlTbLblLnk");
-            
+            Element div = domContext.createElement(HTML.DIV_ELEM);
+            div.setAttribute(HTML.TITLE_ATTR, tab.getLabel());
+
+            td_mid_mid.appendChild(div);
+
             if (labelFacet == null) {
-                td_mid_mid.appendChild(link);
-                // set focus handler
-                if (tabSet.isKeyboardNavigationEnabled()) {
-                    link.setAttribute(HTML.ONFOCUS_ATTR, "return Ice.pnlTabOnFocus(this, false, true);");
-                    link.setAttribute(HTML.ONBLUR_ATTR, "return Ice.pnlTabOnBlur(this, false, true);");   
-                } else {
-                    link.setAttribute(HTML.ONFOCUS_ATTR, "return Ice.pnlTabOnFocus(this, false, false);");
-                    link.setAttribute(HTML.ONBLUR_ATTR, "return Ice.pnlTabOnBlur(this, false, false);");
-                }
+                div.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
+                renderLinkText(label, facesContext, domContext, div, tab, tabSet, active, id);
+            } else {
+                div.setAttribute(HTML.ARIA_TABINDEX_ATTR, "0");
+                div.setAttribute(HTML.ARIA_ROLE_ATTR, "tab");
+                div.setAttribute(HTML.ID_ATTR, id);
 
-                renderLinkText(label, domContext, link, tab, tabSet);                
-            } else {
-                //link.setAttribute(HTML.STYLE_ATTR, "display:none;");
-                label = "<img src='"+ CoreUtils.resolveResourceURL(facesContext,
-                        "/xmlhttp/css/xp/css-images/spacer.gif") + "' \\>";
-                // set focus handler
-                if (tabSet.isKeyboardNavigationEnabled()) {
-                    link.setAttribute(HTML.ONFOCUS_ATTR, "return Ice.pnlTabOnFocus(this, true, true);");
-                    link.setAttribute(HTML.ONBLUR_ATTR, "return Ice.pnlTabOnBlur(this, true, true);");   
-                } else {
-                    link.setAttribute(HTML.ONFOCUS_ATTR, "return Ice.pnlTabOnFocus(this, true, false);");
-                    link.setAttribute(HTML.ONBLUR_ATTR, "return Ice.pnlTabOnBlur(this, true, false);");
-                }
-                link.setAttribute(HTML.STYLE_ELEM, "position:relative; top:0px;");                
-                Element div = domContext.createElement(HTML.DIV_ELEM); 
-                td_mid_mid.appendChild(div);
-                div.setAttribute(HTML.ONCLICK_ATTR, "if(!Ice.isEventSourceInputElement(event)) document.getElementById('"+ linkId+"').onclick();");
-                div.setAttribute(HTML.CLASS_ATTR, "ptfd");
-                div.appendChild(link);
+
                 Node cursor = domContext.getCursorParent();
                 domContext.setCursorParent(div);
                 CustomComponentUtils.renderChild(facesContext, labelFacet);
-                domContext.setCursorParent(cursor);  
-
-                Text spacer = domContext.createTextNode(label);
-                link.appendChild(spacer);
+                domContext.setCursorParent(cursor);
+                Map parameterMap = getParameterMap(facesContext, tab);
+                renderOnClick(facesContext, tabSet, tab, div, parameterMap);
             }
-
-
+            
             Map parameterMap = getParameterMap(facesContext, tab);
-            renderOnClick(facesContext, tabSet, tab, link, parameterMap);
-
             Iterator parameterKeys = parameterMap.keySet().iterator();
             String nextKey;
             while (parameterKeys.hasNext()) {
@@ -677,44 +677,26 @@
             table.setAttribute(HTML.CLASS_ATTR, tabStyleClass);
             if (!disabled) {
                 table.setAttribute(HTML.ONMOUSEOVER_ATTR,
-                                   "this.className='" + tab.getTabOverClass(tabPlacement) + "';");
+                        "this.className='" + tab.getTabOverClass(tabPlacement) + "';");
                 table.setAttribute(HTML.ONMOUSEOUT_ATTR,
-                                   "this.className='" + tab.getTabOffClass(tabPlacement) + "';");
+                        "this.className='" + tab.getTabOffClass(tabPlacement) + "';");
             } else {
                 table.removeAttribute(HTML.ONMOUSEOVER_ATTR);
                 table.removeAttribute(HTML.ONMOUSEOUT_ATTR);
             }
         }
 
-        td_top_left.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_LEFT + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_TOP + disableStyleClassSuffix));
-        td_top_mid.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_MIDDLE + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_TOP + disableStyleClassSuffix));
-        td_top_right.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_RIGHT + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_TOP + disableStyleClassSuffix));
+        td_top_left.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_LEFT + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_TOP + disableStyleClassSuffix));
+        td_top_mid.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_MIDDLE + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_TOP + disableStyleClassSuffix));
+        td_top_right.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_RIGHT + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_TOP + disableStyleClassSuffix));
 
-        td_mid_left.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_LEFT + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_MIDDLE + disableStyleClassSuffix));
-        td_mid_mid.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_MIDDLE + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_MIDDLE + disableStyleClassSuffix));
-        td_mid_right.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_RIGHT + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_MIDDLE + disableStyleClassSuffix));
+        td_mid_left.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_LEFT + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_MIDDLE + disableStyleClassSuffix));
+        td_mid_mid.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_MIDDLE + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_MIDDLE + disableStyleClassSuffix));
+        td_mid_right.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_RIGHT + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_MIDDLE + disableStyleClassSuffix));
 
-        td_bot_left.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_LEFT + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_BOTTOM + disableStyleClassSuffix));
-        td_bot_mid.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_MIDDLE + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_BOTTOM + disableStyleClassSuffix));
-        td_bot_right.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_RIGHT + CSS_DEFAULT
-                .PANEL_TAB_SET_DEFAULT_BOTTOM + disableStyleClassSuffix));
+        td_bot_left.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_LEFT + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_BOTTOM + disableStyleClassSuffix));
+        td_bot_mid.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_MIDDLE + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_BOTTOM + disableStyleClassSuffix));
+        td_bot_right.setAttribute(HTML.CLASS_ATTR, CSSNamePool.get(CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_RIGHT + CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_BOTTOM + disableStyleClassSuffix));
 
         tr_top.appendChild(td_top_left);
         tr_top.appendChild(td_top_mid);
@@ -742,9 +724,9 @@
         if (tab.getTitle() != null) {
             td.setAttribute(HTML.TITLE_ATTR, tab.getTitle());
         }
+
     }
 
-
     protected static String deriveCommonHiddenFieldName(
             FacesContext facesContext,
             UIComponent uiComponent) {
@@ -757,12 +739,12 @@
             String parentClientId =
                     parentNamingContainer.getClientId(facesContext);
             return parentClientId
-                   + NamingContainer.SEPARATOR_CHAR
-                   + UIViewRoot.UNIQUE_ID_PREFIX
-                   + HIDDEN_FIELD_NAME;
+                    + NamingContainer.SEPARATOR_CHAR
+                    + UIViewRoot.UNIQUE_ID_PREFIX
+                    + HIDDEN_FIELD_NAME;
         } catch (NullPointerException e) {
             throw new RuntimeException("Panel Tab Set must be in a <ice:form>",
-                                       e);
+                    e);
         }
     }
 
@@ -773,15 +755,87 @@
      * @param tab
      * @param tabSet
      */
-    private void renderLinkText(String linkText, DOMContext
-            domContext, Element link, PanelTab tab, PanelTabSet tabSet) {
+    private void renderLinkText(String linkText, FacesContext facesContext, DOMContext domContext, Element ele, PanelTab tab, PanelTabSet tabSet, boolean active, String id) {
 
         // create a new or update the old text node for the label
         if (linkText != null && linkText.length() != 0) {
-            Text labelNode = (Text) link.getFirstChild();
+            Text labelNode = (Text) ele.getFirstChild();
+            Map parameterMap = getParameterMap(facesContext, tab);
             if (labelNode == null) {
+                String tabindex;
+                if (active) {
+                    tabindex = "0";
+                } else {
+                    tabindex = "-1";
+                }
                 labelNode = domContext.getDocument().createTextNode(linkText);
-                tab.addHeaderText(domContext, link, labelNode, tabSet);
+                Element table = (Element) domContext.createElement(HTML.TABLE_ELEM);
+                table.setAttribute(HTML.CELLPADDING_ATTR, "0");
+                table.setAttribute(HTML.CELLSPACING_ATTR, "0");
+                table.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
+                Element tr = (Element) domContext.createElement(HTML.TR_ELEM);
+                Element labelTd = (Element) domContext.createElement(HTML.TD_ELEM);
+                table.appendChild(tr);
+
+                ele.appendChild(table);
+                if (tab.getLabelWidth() != null) {
+                    ele.setAttribute(HTML.STYLE_ATTR, "width:" + tab.getLabelWidth() + "px;overflow:hidden;");
+                    
+                    if (tab.isLabelWrap()) {
+                        labelTd.setAttribute(HTML.STYLE_ATTR, "white-space: normal;width:" + tab.getLabelWidth() + "px;");
+                        Element innerDiv = (Element) domContext.createElement(HTML.DIV_ELEM);
+                        innerDiv.setAttribute(HTML.STYLE_ATTR, "max-width:" + tab.getLabelWidth() + "px;text-align:left;");
+                        labelTd.appendChild(innerDiv);
+                        innerDiv.appendChild(labelNode);
+                        innerDiv.setAttribute(HTML.ID_ATTR, id);
+                        innerDiv.setAttribute(HTML.ARIA_ROLE_ATTR, "tab");
+                        innerDiv.setAttribute(HTML.ARIA_TABINDEX_ATTR, tabindex);
+                        innerDiv.setAttribute(HTML.CLASS_ATTR, "icePnlTbLbl");
+                        innerDiv.setAttribute(HTML.ONKEYDOWN_ATTR, "Ice.PanelTabKeyNavigator.handleKeyDown(event, this);");
+                        renderOnClick(facesContext, tabSet, tab, innerDiv, parameterMap);
+                    } else {
+                        labelTd.appendChild(labelNode);
+                        labelTd.setAttribute(HTML.ID_ATTR, id);
+                        labelTd.setAttribute(HTML.ARIA_ROLE_ATTR, "tab");
+                        labelTd.setAttribute(HTML.ARIA_TABINDEX_ATTR, tabindex);
+                        labelTd.setAttribute(HTML.CLASS_ATTR, "icePnlTbLbl");
+                        labelTd.setAttribute(HTML.ONKEYDOWN_ATTR, "Ice.PanelTabKeyNavigator.handleKeyDown(event, this);");
+                        renderOnClick(facesContext, tabSet, tab, labelTd, parameterMap);
+                    }
+                } else {
+                    labelTd.appendChild(labelNode);
+                    labelTd.setAttribute(HTML.ID_ATTR, id);
+                    labelTd.setAttribute(HTML.ARIA_ROLE_ATTR, "tab");
+                    labelTd.setAttribute(HTML.ARIA_TABINDEX_ATTR, tabindex);
+                    labelTd.setAttribute(HTML.CLASS_ATTR, "icePnlTbLbl");
+                    labelTd.setAttribute(HTML.ONKEYDOWN_ATTR, "Ice.PanelTabKeyNavigator.handleKeyDown(event, this);");
+                    renderOnClick(facesContext, tabSet, tab, labelTd, parameterMap);
+                }
+
+                if (tab.getIcon() == null) {
+                    tr.appendChild(labelTd);
+                } else {
+                    Element iconTd = (Element) domContext.createElement(HTML.TD_ELEM);
+                    Element icon = (Element) domContext.createElement(HTML.IMG_ELEM);
+                    icon.setAttribute(HTML.SRC_ATTR, tab.getIcon());
+                    icon.setAttribute(HTML.BORDER_ATTR, "border");
+                    icon.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
+                    iconTd.appendChild(icon);
+
+                    String iconClass = CSS_DEFAULT.PANEL_TAB_HEADER_ICON_DEFAULT_CLASS;
+
+                    if (tab.isIconAlignRight()) {
+                        tr.appendChild(labelTd);
+                        tr.appendChild(iconTd);
+                        iconClass += CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_RIGHT;
+                    } else {
+                        tr.appendChild(iconTd);
+                        tr.appendChild(labelTd);
+                        iconClass += CSS_DEFAULT.PANEL_TAB_SET_DEFAULT_LEFT;
+                    }
+                    iconClass = Util.getQualifiedStyleClass(tabSet, iconClass);
+                    icon.setAttribute(HTML.CLASS_ATTR, iconClass);
+                }
             } else {
                 labelNode.setData(linkText);
             }
@@ -800,7 +854,7 @@
      * @return map
      */
     static Map getParameterMap(FacesContext facesContext,
-                               UIComponent uiComponent) {
+            UIComponent uiComponent) {
         Map parameterMap = new HashMap();
         Iterator children = uiComponent.getChildren().iterator();
         UIComponent nextChild;
@@ -821,36 +875,40 @@
      * @param parameters
      */
     private void renderOnClick(FacesContext facesContext,
-                               UIComponent tabSet,
-                               PanelTab tab,
-                               Element root, Map parameters) {
+            UIComponent tabSet,
+            PanelTab tab,
+            Element root, Map parameters) {
         UIComponent uiForm = findForm(tabSet);
         if (uiForm == null) {
             throw new FacesException("CommandLink must be contained in a form");
         }
         String uiFormClientId = uiForm.getClientId(facesContext);
         String onclick = tab.getOnclick();
+        String hiddenFieldId = root.getAttribute(HTML.ID_ATTR) + "Clk";
         root.setAttribute("onclick", combinedPassThru(onclick, getJavaScriptOnClickString(facesContext,
-                                                                tabSet,
-                                                                uiFormClientId,
-                                                                parameters))); // replaced command w/component
+                tabSet,
+                uiFormClientId,
+                hiddenFieldId,
+                parameters))); // replaced command w/component
     }
 
     private String getJavaScriptOnClickString(FacesContext facesContext,
-                                              UIComponent uiComponent,
-                                              String formClientId,
-                                              Map parameters) {
-        String submit =  "iceSubmitPartial(";
-        if (!((PanelTabSet)uiComponent).isPartialSubmit()) {
-            submit =  "iceSubmit(";
+            UIComponent uiComponent,
+            String formClientId,
+            String hiddenFieldId,
+            Map parameters) {
+        String submit = "iceSubmitPartial(";
+        if (!((PanelTabSet) uiComponent).isPartialSubmit()) {
+            submit = "iceSubmit(";
         }
         return getJavascriptHiddenFieldSetters(facesContext,
-                                               uiComponent, formClientId,
-                                               parameters)
-               + submit              
-               + " document.forms['" + formClientId + "'],"
-               + " this,event); "
-               + "return false;";
+                uiComponent, formClientId,
+                parameters)
+                + "document.forms['" + formClientId + "']['" + hiddenFieldId + "'].value ='" + hiddenFieldId + "';"
+                + submit
+                + " document.forms['" + formClientId + "'],"
+                + " this,event); "
+                + "return false;";
     }
 
     /**
@@ -861,9 +919,9 @@
      * @return string representing hidden field setters for this tabset
      */
     private String getJavascriptHiddenFieldSetters(FacesContext facesContext,
-                                                   UIComponent uiComponent,
-                                                   String formClientId,
-                                                   Map parameters) {
+            UIComponent uiComponent,
+            String formClientId,
+            Map parameters) {
         StringBuffer buffer;
         buffer = new StringBuffer("document.forms['" + formClientId + "']['");
         buffer.append(deriveCommonHiddenFieldName(facesContext, uiComponent));
@@ -900,6 +958,7 @@
         img.setAttribute(HTML.HEIGHT_ATTR, "1");
         img.setAttribute(HTML.WIDTH_ATTR, "4");
         img.setAttribute(HTML.ALT_ATTR, "");
+        img.setAttribute(HTML.ARIA_ROLE_ATTR, "presentation");
 
         td.appendChild(img);
     }
@@ -919,17 +978,17 @@
      * @throws IOException
      */
     protected void writeTabCell(DOMContext domContext,
-                                FacesContext facesContext,
-                                PanelTabSet tabSet,
-                                int tabCount,
-                                int selectedIndex,
-                                Element tr,
-                                UISeries uiList)
+            FacesContext facesContext,
+            PanelTabSet tabSet,
+            int tabCount,
+            int selectedIndex,
+            Element tr,
+            UISeries uiList)
             throws IOException {
         // create a new table data Element
         Element td = domContext.createElement(HTML.TD_ELEM);
         td.setAttribute(HTML.ID_ATTR,
-                        ClientIdPool.get(tabSet.getClientId(facesContext) + "td" + tabCount));
+                ClientIdPool.get(tabSet.getClientId(facesContext) + "td" + tabCount));
         // append the new table data Element to the table row
         tr.appendChild(td);
 
@@ -938,6 +997,7 @@
 //        td.setAttribute(HTML.COLSPAN_ATTR, Integer.toString(tabCount + 2 ));
         td.setAttribute(HTML.CLASS_ATTR, tabSet.getContentClass());
 
+
         // set the cursor parent to the new table data Element
         // this will cause the renderChild method to append the child nodes
         // to the new table data Element
@@ -951,8 +1011,8 @@
             UIComponent child =
                     getUIComponent((UIComponent) tabSet.getChildren().get(0));
             while (uiList.isRowAvailable()) {
-                if (rowsToBeDisplayed > 0 &&
-                    rowsDisplayed >= rowsToBeDisplayed) {
+                if (rowsToBeDisplayed > 0
+                        && rowsDisplayed >= rowsToBeDisplayed) {
                     break;
                 }
                 if (child instanceof PanelTab) {
@@ -984,8 +1044,8 @@
     }
 
     private UIComponent getUIComponent(UIComponent uiComponent) {
-        if (uiComponent instanceof UIForm ||
-            uiComponent instanceof UINamingContainer) {
+        if (uiComponent instanceof UIForm
+                || uiComponent instanceof UINamingContainer) {
             List children = uiComponent.getChildren();
             for (int i = 0, len = children.size(); i < len; i++) {
                 uiComponent = getUIComponent((UIComponent) children.get(i));
Index: core/src/com/icesoft/faces/renderkit/dom_html_basic/HTML.java
===================================================================
--- core/src/com/icesoft/faces/renderkit/dom_html_basic/HTML.java	(revision 21617)
+++ core/src/com/icesoft/faces/renderkit/dom_html_basic/HTML.java	(working copy)
@@ -539,4 +539,41 @@
     public static final String HREF_PARAM_SEPARATOR = "&";
     public static final String HREF_PARAM_NAME_FROM_VALUE_SEPARATOR = "=";
 
+    //HTML aria attributes
+    public static final String ARIA_ROLE_ATTR = "role";
+    public static final String ARIA_TABINDEX_ATTR = "tabindex";
+    public static final String ARIA_ACTIVEDESCENDANT_ATTR = "aria-activedescendant";
+    public static final String ARIA_ATOMIC_ATTR = "aria-atomic";
+    public static final String ARIA_AUTOCOMPLETE_ATTR = "aria-autocomplete";
+    public static final String ARIA_BUSY_ATTR = "aria-busy";
+    public static final String ARIA_CHECKED_ATTR = "aria-checked";
+    public static final String ARIA_CONTROLS_ATTR = "aria-controls";
+    public static final String ARIA_DESCRIBEDBY_ATTR = "aria-describedby";
+    public static final String ARIA_DISABLED_ATTR = "aria-disabled";
+    public static final String ARIA_DROPEFFECT_ATTR = "aria-dropeffect";
+    public static final String ARIA_EXPANDED_ATTR = "aria-expanded";
+    public static final String ARIA_FLOWTO_ATTR = "aria-flowto";
+    public static final String ARIA_GRABBED_ATTR = "aria-grabbed";
+    public static final String ARIA_HASPOPUP_ATTR = "aria-haspopup";
+    public static final String ARIA_HIDDEN_ATTR = "aria-hidden";
+    public static final String ARIA_INVALID_ATTR = "aria-invalid";
+    public static final String ARIA_LABEL_ATTR = "aria-label";
+    public static final String ARIA_LABELLEDBY_ATTR = "aria-labelledby";
+    public static final String ARIA_LEVEL_ATTR = "aria-level";
+    public static final String ARIA_LIVE_ATTR = "aria-live";
+    public static final String ARIA_MULTILINE_ATTR = "aria-multiline";
+    public static final String ARIA_MULTISELECTABLE_ATTR = "aria-multiselectable";
+    public static final String ARIA_OWNS_ATTR = "aria-owns";
+    public static final String ARIA_POSINSET_ATTR = "aria-posinset";
+    public static final String ARIA_PRESSED_ATTR = "aria-pressed";
+    public static final String ARIA_READONLY_ATTR = "aria-readonly";
+    public static final String ARIA_RELEVANT_ATTR = "aria-relevant";
+    public static final String ARIA_REQUIRED_ATTR = "aria-required";
+    public static final String ARIA_SELECTED_ATTR = "aria-selected";
+    public static final String ARIA_SETSIZE_ATTR = "aria-setsize";
+    public static final String ARIA_SORT_ATTR = "aria-sort";
+    public static final String ARIA_VALUEMAX_ATTR = "aria-valuemax";
+    public static final String ARIA_VALUEMIN_ATTR = "aria-valuemin";
+    public static final String ARIA_VALUENOW_ATTR = "aria-valuenow";
+    public static final String ARIA_VALEUTEXT_ATTR = "aria-valuetext";
 }
Index: core/src/com/icesoft/faces/resources/css/xp/xp.css
===================================================================
--- core/src/com/icesoft/faces/resources/css/xp/xp.css	(revision 21617)
+++ core/src/com/icesoft/faces/resources/css/xp/xp.css	(working copy)
@@ -551,7 +551,7 @@
     white-space: nowrap;
 }
 
-.icePnlTbOn .MidMid a, .icePnlTbOn .MidMid div {
+.icePnlTbOn .MidMid>a, .icePnlTbOn .MidMid>div {
     text-decoration: none;
     color: #000000;
     cursor: pointer;
@@ -559,10 +559,11 @@
     padding-top: 5px;
     padding-right: 15px;
     padding-left: 15px;
+    padding-bottom: 2px;
 }
 
 
-* html .icePnlTbOn .MidMid a, * html .icePnlTbOn .MidMid div {
+* html .icePnlTbOn .MidMid>a, * html .icePnlTbOn .MidMid>div {
     width: 1%;
 }
 
@@ -652,17 +653,18 @@
     white-space: nowrap;
 }
 
-.icePnlTbOff .MidMid a, icePnlTbOff .MidMid div {
+.icePnlTbOff .MidMid>a, .icePnlTbOff .MidMid>div {
     text-decoration: none;
     color: #000000;
     cursor: pointer;
     display: block;
     padding-top: 5px;
     padding-right: 15px;
+    padding-bottom: 2px;
     padding-left: 15px;
 }
 
-* html .icePnlTbOff .MidMid a, * html .icePnlTbOff .MidMid div {
+* html .icePnlTbOff .MidMid>a, * html .icePnlTbOff .MidMid>div {
     width: 1%;
 }
 
@@ -753,17 +755,18 @@
     white-space: nowrap;
 }
 
-.icePnlTbOver .MidMid a, .icePnlTbOver .MidMid div{
+.icePnlTbOver .MidMid>a, .icePnlTbOver .MidMid>div{
     text-decoration: none;
     color: #000000;
     cursor: pointer;
     display: block;
     padding-top: 5px;
     padding-right: 15px;
+    padding-bottom: 2px;
     padding-left: 15px;
 }
 
-* html .icePnlTbOver .MidMid a, * html .icePnlTbOver .MidMid div {
+* html .icePnlTbOver .MidMid>a, * html .icePnlTbOver .MidMid>div {
     width: 1%;
 }
 
@@ -886,7 +889,7 @@
     white-space: nowrap;
 }
 
-.icePnlTbOnBtm .MidMid a, .icePnlTbOnBtm .MidMid div {
+.icePnlTbOnBtm .MidMid>a, .icePnlTbOnBtm .MidMid>div {
     text-decoration: none;
     color: #000000;
     cursor: pointer;
@@ -894,9 +897,10 @@
     padding-top: 5px;
     padding-right: 15px;
     padding-left: 15px;
+    padding-bottom: 2px;
 }
 
-* html .icePnlTbOnBtm .MidMid a, * html .icePnlTbOnBtm .MidMid div {
+* html .icePnlTbOnBtm .MidMid>a, * html .icePnlTbOnBtm .MidMid>div {
     width: 1%;
 }
 
@@ -986,7 +990,7 @@
     white-space: nowrap;
 }
 
-.icePnlTbOffBtm .MidMid a, .icePnlTbOffBtm .MidMid div{
+.icePnlTbOffBtm .MidMid>a, .icePnlTbOffBtm .MidMid>div{
     text-decoration: none;
     color: #000000;
     cursor: pointer;
@@ -994,9 +998,10 @@
     padding-top: 5px;
     padding-right: 15px;
     padding-left: 15px;
+    padding-bottom: 2px;
 }
 
-* html .icePnlTbOffBtm .MidMid a, * html .icePnlTbOffBtm .MidMid div {
+* html .icePnlTbOffBtm .MidMid>a, * html .icePnlTbOffBtm .MidMid>div {
     width: 1%;
 }
 
@@ -1087,7 +1092,7 @@
     white-space: nowrap;
 }
 
-.icePnlTbOverBtm .MidMid a, .icePnlTbOverBtm .MidMid div {
+.icePnlTbOverBtm .MidMid>a, .icePnlTbOverBtm .MidMid>div {
     text-decoration: none;
     color: #000000;
     cursor: pointer;
@@ -1095,9 +1100,10 @@
     padding-top: 5px;
     padding-right: 15px;
     padding-left: 15px;
+    padding-bottom: 2px;
 }
 
-* html .icePnlTbOverBtm .MidMid a, * html .icePnlTbOverBtm .MidMid div {
+* html .icePnlTbOverBtm .MidMid>a, * html .icePnlTbOverBtm .MidMid>div {
     width: 1%;
 }
 
