Skip to content

aria-posinset becomes 0 once community-list node is opened #4068

@AAwouters

Description

@AAwouters

Describe the bug

Angular/cdk version 18 adds the aria-posinset attribute to cdk-tree-nodes.
This attribute should have a value starting from 1 indicating what the position of the node is in the set.
When opening the node to show the sub-communities, this value becomes 0 which is not a valid value.

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to the /community-list page ('Communities & Collections' button in the navbar)
  2. Inspect the community nodes using browser tools & look for the aria-posinset property on the cdk-tree-nodes
  3. Click on the node
  4. Notice that the aria-posinset value becomes 0

Expected behavior

The cdk-tree-node should retain its original aria-posinset value.

Related work

Introduced with #3717

Actions to take once resolved

Once this issue is resolved, the aria-valid-attr-value test in the community-list e2e test should be re-enabled.

Additional information

From the angular/cdk source code:
The aria-posinset value is determined using findIndex in the _getPositionInSet method.
findIndex returns -1 when no matching entry can be found, so this might explain where the 0 value comes from.
Why exactly no matching entry can be found will require deeper investigation.

Metadata

Metadata

Assignees

Labels

accessibilityaffects: mainIssue impacts "main" (latest release).bugclaimed: AtmireAtmire team is working on this issue & will contribute back

Type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions