# Feature DREAM-305 - [TreeView] Allow nodes to be anchors or buttons

Project: Stream Design System
Status: closed
URL: https://community.openproject.org/work_packages/DREAM-305

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Target versions | 16.1.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Frontend components and Primer design system / TreeView |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Cameron Dutro |
| Product manager |  |
| Feature Lead |  |
| Developers | Cameron Dutro |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**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)
