Skip to content

feat: add aria snapshot utilities#8

Open
hi-ogawa wants to merge 41 commits intosheremet-va:masterfrom
hi-ogawa:feat-aria
Open

feat: add aria snapshot utilities#8
hi-ogawa wants to merge 41 commits intosheremet-va:masterfrom
hi-ogawa:feat-aria

Conversation

@hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Mar 13, 2026

I structured new code in a following way:

 src/aria/
 ├── folk/                        ← fork of Playwright, mirror its paths
 │   ├── injected/
 │   │   └── ariaSnapshot.ts      ← generateAriaTree, toAriaNode, renderAriaTree
 │   │                              imports roleUtils/domUtils from ivya
 │   └── isomorphic/
 │       └── ariaSnapshot.ts      ← parseAriaSnapshot, KeyParser, types,
 │                                  matchesNode, containsList, listEqual
 └── index.ts                    ← `ivya/aria` exports
 └── match.ts                     ← vitest-specific glue:
                                    three-way merge layer (mergeNode,
                                    mergeChildLists, pairChildren),
                                    regex-transparent diffing,

The documentation on Aria format is added as a dedicated page /guide/browser/aria-snapshots.md in

@sheremet-va
Copy link
Owner

Do we need a separate folder? ivya is a fork of injected already

@hi-ogawa
Copy link
Contributor Author

Putting all inside src/aria was somewhat simpler. What do you suggest? flat out under src/ariaXxx.ts?

@hi-ogawa hi-ogawa marked this pull request as ready for review March 13, 2026 10:16
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to go through this algorithm more carefully. Seems like there's some slop 🤖

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.

2 participants