Tree"

From Documentation
Line 1: Line 1:
 
{{ZKComponentReferencePageHeader}}
 
{{ZKComponentReferencePageHeader}}
  
= Listbox =
+
= Tree =
 
*Demonstration: N/A
 
*Demonstration: N/A
 
*Style Guide: N/A
 
*Style Guide: N/A
 
*[http://www.zkoss.org/product/edition.dsp Available in ZK EE only]
 
*[http://www.zkoss.org/product/edition.dsp Available in ZK EE only]
 
   since 9.5.0
 
   since 9.5.0
 
== Related components ==
 
Auxhead, Auxheader, Treecell, Treecol, Treefooter, Treeitem, Treerow
 
  
 
== Required Settings ==
 
== Required Settings ==
Line 16: Line 13:
 
! <center>Description</center>
 
! <center>Description</center>
 
|-
 
|-
| aria-label
+
| aria-label / aria-labelledby
| Describe the tree.
+
| Name the Tree. For more information about naming, please refer to [[ZK_Component_Reference/Accessibility | Accessibility]]
 
|}
 
|}
  
Line 25: Line 22:
 
! <center>Description</center>
 
! <center>Description</center>
 
|-
 
|-
| ArrowUp/ArrowDown
+
| ArrowUp / ArrowDown
 
| Select Treeitems or focus on Treecols.
 
| Select Treeitems or focus on Treecols.
 
|-
 
|-
| ArrowLeft/ArrowRight
+
| ArrowLeft / ArrowRight
 
| If the treeitem is openable, toggle the open status. Focus on Treecell or Treecols.
 
| If the treeitem is openable, toggle the open status. Focus on Treecell or Treecols.
 
|}
 
|}
 
== Example ==
 
<source lang="xml">
 
<zk xmlns:ca="client/attribute">
 
    <tree ca:aria-label="Option tree">
 
        <treecols>
 
            <treecol width="100px" id="tcola" label="A" />
 
            <treecol label="B" />
 
            <treecol label="C" />
 
        </treecols>
 
        <treechildren>
 
            <treeitem id="ti0" selected="true">
 
                <treerow>
 
                    <treecell label="A" />
 
                    <treecell label="B" />
 
                    <treecell label="C" />
 
                </treerow>
 
                <treechildren>
 
                    <treeitem selected="true">
 
                        <treerow>
 
                            <treecell label="A-1" />
 
                            <treecell label="B" />
 
                            <treecell label="C" />
 
                        </treerow>
 
                    </treeitem>
 
                    <treeitem>
 
                        <treerow>
 
                            <treecell label="A-2" />
 
                            <treecell label="B" />
 
                            <treecell label="C" />
 
                        </treerow>
 
                    </treeitem>
 
                </treechildren>
 
            </treeitem>
 
        </treechildren>
 
    </tree>
 
</zk>
 
</source>
 

Revision as of 23:38, 28 July 2020

Tree

 since 9.5.0

Required Settings

Attributes
Description
aria-label / aria-labelledby Name the Tree. For more information about naming, please refer to Accessibility

Keyboard Support

Key
Description
ArrowUp / ArrowDown Select Treeitems or focus on Treecols.
ArrowLeft / ArrowRight If the treeitem is openable, toggle the open status. Focus on Treecell or Treecols.