# Bug OP-18318 - Clicking "Check all"/"Uncheck all" opens and closes collapsible sections

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-18318

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Frontend components and Primer design system, Administration |
| Target versions | 17.0.0 |
| Observed in versions | 16.6.0 |
| Sprint | 17.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 16.6.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | Yes |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| 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

### Steps to reproduce

1.  Login as a user with permissions to administer OpenProject
    
2.  Go to _Administration_ &gt; _Users and permissions_ &gt; _Roles and permissions_
    
3.  Click on an existing role in the table or click &quot;+ Role&quot; to create a new role
    
4.  To the right of a collapsible section header, click &quot;Check all&quot; or &quot;Uncheck all&quot;
    

### What is the buggy behavior?

*   The collapsible section is toggled: if it was opened, it is closed. If it was closed, it is now open.&nbsp;
    

### What is the expected behavior?

1.  The collapsible section should not be toggled - (_OR - for discussion, should always be opened?)_
    

### Hints for QA

Also reproducible on:

*   _Administation &gt; Users and permissions &gt; Permissions report_
    

The fix includes a reimplementation of &quot;check all&quot; functionality globally, so in addition to checking the bug is no longer reproducible, it would also be good to double check the following screens that show &quot;check all&quot; buttons but without collapsible sections:

*   _Administration &gt; Work packages &gt; Workflow_ (N.B. the &quot;check all&quot; buttons are truncated - however this appears to be an existing issue).
    
*   _Administration &gt; API and webhooks &gt; Webhooks &gt; Webhook name_ (under Enabled Events)
    

The reimplementation includes some accessibility improvements:

*   Tooltip text on the Permissions report table now shows &quot;Check all/Uncheck all in row&quot;, &quot;Check all/Uncheck all in column&quot;.
    
*   `aria-controls` attribute is applied to  &quot;Check all&quot;/&quot;Uncheck all&quot; buttons when they are not descendants of a fieldset/checkbox group container (in plain English: a different part of the page hierarchy). This is the case for collapsible sections. `aria-controls` indicates a causal relationship between buttons and the checkboxes.
    

There is also a small styling change on the Permissions report page - we use a label rather than italics to indicate &quot;built in&quot; roles. _(An FYI has been added to the UX/UI meeting agenda:_ [_https://community.openproject.org/meetings/7628#meeting-agenda-item-21490_](https://community.openproject.org/meetings/7628#meeting-agenda-item-21490) _)_

### Environment information

**OpenProject installation type**

*   Hosted cloud edition
    

**OpenProject version**

**Core build**

[5749b434e01b71117c9f97b5421060d127600ea6](https://github.com/opf/openproject/commits/5749b434e01b71117c9f97b5421060d127600ea6)

**Product version**

[89661f5c04938c6a56815503e2b43f5d87e782c4](https://github.com/opf/saas-openproject/commits/89661f5c04938c6a56815503e2b43f5d87e782c4)

**Core version**

OpenProject 17.0.0

**Browser**

*   [x] Chrome
*   [ ] Firefox
*   [ ] Safari
*   [ ] Mobile Safari
*   [ ] Other (please specify)

**Operating System**

*   [ ] Windows
*   [x] Mac OS X
*   [ ] Mobile iOS
*   [ ] Mobile Android
*   [ ] Linux (please specify distro)
*   [ ] Chrome OS
*   [ ] Other (please specify)

**Language**

_en\_GB_
