Skip to content

chore(aria): don't ignore top-level containerMode - #36471

Merged
Simon Knott (Skn0tt) merged 2 commits into
microsoft:mainfrom
Skn0tt:chore-top-level-containerMode
Jun 30, 2025
Merged

chore(aria): don't ignore top-level containerMode#36471
Simon Knott (Skn0tt) merged 2 commits into
microsoft:mainfrom
Skn0tt:chore-top-level-containerMode

Conversation

@Skn0tt

Copy link
Copy Markdown
Member

Closes #36456

convertSeq(fragment, yamlDoc.contents as yamlTypes.YAMLSeq);
if (errors.length)
return { errors, fragment: emptyFragment };
if (fragment.children?.length === 1)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of deleting, doing && !fragment.containerMode would also solve the issue. But my understanding is that this line is just a tiny optimisation anyway, so I removed the complexity instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out it's not a tiny optimisation! It has an impact on whether we match the element itself or its parent, as is evidenced by the failing tests debug-controller.spec.ts:286 cli-codegen-aria.spec.ts:76 trace-viewer.spec.ts:1189. I turned it into the other thing.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node22-1
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

46467 passed, 931 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: children: deep-equal is sometimes ignored when at the top level

2 participants