# Bug OP-20659 - Template defects in project include list, sort dialog, custom text and graphs

Project: OpenProject
Status: merged
URL: https://community.openproject.org/work_packages/OP-20659

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Frontend components and Primer design system, Accessibility, Modules and project features / Project overview, Modules and project features / Backlogs, Modules and project features / Work packages |
| Target versions | 18.0.0 |
| Observed in versions | 18.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | Yes |
| Pull preview |  |
| List | a11y report 2026 |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Cécile Guiot |
| Accountable |  |
| Product manager |  |
| Developers | Alexander Coles |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Before filing a report

Found during Angular strict template checking for <mention class="mention" data-id="OP-20641" data-type="work_package" data-text="#OP-20641">#OP-20641</mention>. All four defects reproduced in local Angular component tests running in Chromium on 8 November 2026. The fix and the source tests are in [PR <mention class="mention" data-id="26498" data-type="work_package" data-text="#26498">#26498</mention>](https://github.com/opf/openproject/pull/26498).

### Steps to reproduce

1.  **Include projects.** Open **Include projects** in a work package table. Use the arrow keys to navigate the list, press **Enter** on a nested item, press **Arrow Up** at the first item, and press **Space** with a project checkbox focused.
2.  **Sort by.** Open the table configuration and select **Sort by → Automatic**. Check the accessible labels of the first, second and third criterion fields.
3.  **Custom text.** On a project overview with a **Custom text** widget, edit the widget and inspect the attachments legend below the editor.
4.  **Embedded graph.** Open a work package graph widget and refresh its data so the query returns no results. Check for an empty-state message.

### What is the buggy behavior?

  - **Include projects.** The active project has no highlight. Enter does not select the nested project. Arrow Up at the first item throws a JavaScript error. Space on the native checkbox emits two update events for one action.
  - **Sort by.** The first criterion label is empty. The second is labelled as the first, and the third as the second.
  - **Custom text.** The attachments legend is empty in edit mode.
  - **Embedded graph.** The empty-state element has no visible message after the empty dataset refresh.

### What is the expected behavior?

Keyboard navigation visibly highlights the active project, Enter selects it, Arrow Up at the boundary is handled, and Space emits one checkbox update. The sort fields are labelled first, second and third. The widget legend reads **Attachments**, and an empty graph displays **No results**.

### Important note

These are component-level Chromium reproductions. The full OpenProject browser workflows still need a staging check. The project-include test verified the duplicate update events. It did not establish that the checkbox always ends in its original state.

### **Logs**

The project-include Arrow Up case emitted `TypeError: Cannot read properties of undefined (reading 'children')`. Nine expected-behavior assertions failed across the four component suites.

### Screenshots and other files

No screenshots captured. Reproduction tests are available in the fix PR.

### Environment information

Local OpenProject checkout, Angular/Vitest component runner, Chromium. Stage browser verification pending.
