Content
View differences
Updated by Henriette Darge about 1 year ago
**As** a developer
**I want to** be able to create `TreeView` nodes that are anchors (i.e. `<a>` elements) or buttons
**so that** the `TreeView` component can be used for navigation
**Acceptance criteria**
* Support `a`, `button` and normal texts (so basically `span`) as tags for the tree items (leaf or node)
* When a Button/Anchor item has focus:
* Pressing Enter/Space will trigger the Button/Anchor
* Pressing the arrow keys will expand/collapse
* When a normal `span` has focus
* Pressing Enter/Space will expand/collapse
* Pressing the arrow keys will expand/collapse
**Hint for QA**
This can be tested here:
* [https://qa.openproject-edge.com/lookbook/inspect/primer/open\_project/tree\_view/links](https://qa.openproject-edge.com/lookbook/inspect/primer/open_project/tree_view/links)
* [https://qa.openproject-edge.com/lookbook/inspect/primer/open\_project/tree\_view/buttons](https://qa.openproject-edge.com/lookbook/inspect/primer/open_project/tree_view/buttons)
**I want to** be able to create `TreeView` nodes that are anchors (i.e. `<a>` elements) or buttons
**so that** the `TreeView` component can be used for navigation
**Acceptance criteria**
* Support `a`, `button` and normal texts (so basically `span`) as tags for the tree items (leaf or node)
* When a Button/Anchor item has focus:
* Pressing Enter/Space will trigger the Button/Anchor
* Pressing the arrow keys will expand/collapse
* When a normal `span` has focus
* Pressing Enter/Space will expand/collapse
* Pressing the arrow keys will expand/collapse
**Hint for QA**
This can be tested here:
* [https://qa.openproject-edge.com/lookbook/inspect/primer/open\_project/tree\_view/links](https://qa.openproject-edge.com/lookbook/inspect/primer/open_project/tree_view/links)
* [https://qa.openproject-edge.com/lookbook/inspect/primer/open\_project/tree\_view/buttons](https://qa.openproject-edge.com/lookbook/inspect/primer/open_project/tree_view/buttons)