- [Experimental] File Directory Treeview Example Using Declared Properties -
+[Experimental] File Directory Treeview Example Using Computed Properties
About This Experimental Example
-- This experimental version of the File Directory Treeview Example Using - Declared Properties example is not intended to ever be released or - shown to the public. It exists merely to ensure that experimental - content support can be adequately developed and tested. When support - is fully implemented, this example can be deleted. + This experimental version of the File Directory Treeview Example Using Declared Properties example is not intended to ever be released or shown to the public. + It exists merely to ensure that experimental content support can be adequately developed and tested. + When support is fully implemented, this example can be deleted.
- The following example implementation of the
- Tree View Pattern simulates a
- widget for selecting a file or folder from within a hierarchical file
- system for viewing in a file viewer. In the My Documents
tree,
- each parent node represents a folder and each end node represents a
- file. Activating a node selects the node and puts the name of the
- folder or file in the read-only edit field that represents the file
- viewer.
-
- The code in this example explicitly declares values for
- aria-setsize
, aria-posinset
and
- aria-level
, which overrides browser computation of values
- for these properties. The ARIA specification for these properties
- states that browsers can, but are not required to, compute these
- values.
+ This example relies on the browser to compute values for aria-setsize
, aria-posinset
, and aria-level
.
+ The ARIA specification for these properties states that browsers can, but are not required to, compute their values.
+ So, some browser and assistive technology combinations may not compute or report correct position and level information if it is not explicitly declared.
+ If testing reveals gaps in support for these properties, override automatic computation by explicitly declaring their values as demonstrated in the example of a File Directory Treeview using declared properties.
Similar examples include:
About This Experimental Example
Experimental Example
My Documents
--
-
-
+
My Documents
+-
+
-
Projects
-
-
- - project-1.docx - -
- - project-2.docx - -
- - project-3 +
- project-1.docx +
- project-2.docx +
-
+ Project 3
-
-
- - project-3A.docx - -
- - project-3B.docx - -
- - project-3C.docx - +
- project-3A.docx +
- project-3B.docx +
- project-3C.docx
- - - project-4.docx - -
- - project-5 +
- project-4.docx +
-
+ Project 5
-
-
- - project-5A.docx - -
- - project-5B.docx - -
- - project-5C.docx - -
- - project-5D.docx - -
- - project-5E.docx - -
- - project-5F.docx - +
- project-5A.docx +
- project-5B.docx +
- project-5C.docx +
- project-5D.docx +
- project-5E.docx +
- project-5F.docx
- - +
-
Reports
-
-
- +
-
report-1
-
-
- - report-1A.docx - -
- - report-1B.docx - -
- - report-1C.docx - +
- report-1A.docx +
- report-1B.docx +
- report-1C.docx
- - +
-
report-2
-
-
- - report-2A.docx - -
- - report-2B.docx - -
- - report-2C.docx - -
- - report-2D.docx - +
- report-2A.docx +
- report-2B.docx +
- report-2C.docx +
- report-2D.docx
- - +
-
report-3
-
-
- - report-3A.docx - -
- - report-3B.docx - -
- - report-3C.docx - -
- - report-3D.docx - +
- report-3A.docx +
- report-3B.docx +
- report-3C.docx +
- report-3D.docx
- - +
-
Letters
-
-
- +
-
letter-1
-
-
- - letter-1A.docx - -
- - letter-1B.docx - -
- - letter-1C.docx - +
- letter-1A.docx +
- letter-1B.docx +
- letter-1C.docx
- - +
-
letter-2
-
-
- - letter-2A.docx - -
- - letter-2B.docx - -
- - letter-2C.docx - -
- - letter-2D.docx - +
- letter-2A.docx +
- letter-2B.docx +
- letter-2C.docx +
- letter-2D.docx
- - +
-
letter-3
-
-
- - letter-3A.docx - -
- - letter-3B.docx - -
- - letter-3C.docx - -
- - letter-3D.docx - +
- letter-3A.docx +
- letter-3B.docx +
- letter-3C.docx +
- letter-3D.docx
- +
-
Projects
Accessibility Features
-- To make the focus indicator easier to see, nodes in the tree have - custom focus and hover styling created using CSS focus and hover - pseudo-classes. -
+To make the focus indicator easier to see, nodes in the tree have custom focus and hover styling created using CSS focus and hover pseudo-classes.
Terms Used to Describe Trees
- A tree item that can be expanded to reveal child items is called a - parent node. It is a closed node when the children are hidden and an - open node when it is expanded. An end node does not have any children. - For a complete list of terms and definitions, see the - Tree View Pattern. + A tree item that can be expanded to reveal child items is called a parent node. + It is a closed node when the children are hidden and an open node when it is expanded. + An end node does not have any children. + For a complete list of terms and definitions, see the Treeview Pattern.
Keyboard Support
- Note that in this example, selection and focus are distinct; moving - focus does not change which node is selected. Because selection does - not follow focus, keyboard and screen reader users can navigate and - explore the tree without changing the content of the file viewer. To - learn more about this aspect of the design, read the guidance section - about - Deciding When to Make Selection Automatically Follow Focus. + Note that in this example, selection and focus are distinct; moving focus does not change which node is selected. + Because selection does not follow focus, keyboard and screen reader users can navigate and explore the tree without changing the content of the file viewer. + To learn more about this aspect of the design, see + Deciding When to Make Selection Automatically Follow Focus.
Enter | -
- Performs the default action, which is to select the node,
- causing the name of the node to appear in the
- File or Folder Selectedtextbox. - |
+ Performs the default action, which is to select the node, causing the name of the node to appear in the File or Folder Selectedtextbox. |
||||
---|---|---|---|---|---|---|
Space | -
- Performs the default action, which is to select the node,
- causing the name of the node to appear in the
- File or Folder Selectedtextbox. - |
+ Performs the default action, which is to select the node, causing the name of the node to appear in the File or Folder Selectedtextbox. |
||||
Down arrow |
|
@@ -669,10 +211,7 @@ Up arrow |
|
@@ -681,14 +220,8 @@ Right Arrow |
|
@@ -698,45 +231,26 @@
|
Home | -- Moves focus to first node without opening or closing a node. - | +Moves focus to first node without opening or closing a node. | ||||
End | -- Moves focus to the last node that can be focused without - expanding any nodes that are closed. - | +Moves focus to the last node that can be focused without expanding any nodes that are closed. | ||||
a-z, A-Z |
|
* (asterisk) |
|
@@ -774,18 +285,10 @@ ul |
|
@@ -794,10 +297,7 @@ aria-labelledby="ID_REFERENCE" |
ul |
-
- Refers to the heading element that contains the label that
- identifies the purpose of the tree .
- |
+ Refers to the heading element that contains the label that identifies the purpose of the tree . |
treeitem |
@@ -811,14 +311,8 @@ li |
|
li |
|
@@ -860,19 +338,9 @@ li |
|
@@ -882,19 +350,9 @@ li |
|
@@ -905,10 +363,7 @@
|
@@ -919,83 +374,20 @@
|
-
-
- | aria-setsize="number" |
- li |
-
- Defines the number of treeitem elements in the set
- of treeitem elements that are in the same branch
- and at the same level within the hierarchy.
- |
- |||
- | aria-posinset="number" |
- li |
-
-
|
|||
- | aria-level="number" |
- li |
-
-
|
- |||
group |
ul |
|