Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement traversal API for Graph #426

Merged
merged 6 commits into from
Oct 6, 2020
Merged

Implement traversal API for Graph #426

merged 6 commits into from
Oct 6, 2020

Conversation

kasperisager
Copy link
Contributor

@kasperisager kasperisager commented Oct 2, 2020

This pull request implements a traversal API for the Graph class, which is needed for correctly dealing with cyclic aria-owns references:

// We should use the `Graph` class for building up a graph of references and
// reject any reference that would cause a cycle. Until then, cyclic references
// will cause all nodes participating in the cycle to become inert.
t.deepEqual(Node.from(foo, device).toJSON(), [[Inert.of(foo).toJSON(), []]]);
t.deepEqual(Node.from(bar, device).toJSON(), [[Inert.of(bar).toJSON(), []]]);

The changes are breaking as Graph#neighbors() now returns Iterable<T> rather than Option<Set<T>>, which seemed like a strong promise.

@kasperisager kasperisager added the major Backwards-incompatible change that touches public API label Oct 2, 2020
@kasperisager kasperisager self-assigned this Oct 2, 2020
* master:
  Update changelog
  Introduce `@siteimprove/alfa-url` package (#421)
  Mark `Property` as internal
  Default `Import` condition to `None`
@kasperisager kasperisager marked this pull request as ready for review October 5, 2020 10:25
@kasperisager kasperisager requested a review from Jym77 October 5, 2020 10:25
Copy link
Contributor

@Jym77 Jym77 left a comment

Choose a reason for hiding this comment

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

Nitpicking a bit…

packages/alfa-graph/src/graph.ts Outdated Show resolved Hide resolved
packages/alfa-graph/test/graph.spec.ts Outdated Show resolved Hide resolved
packages/alfa-graph/src/graph.ts Show resolved Hide resolved
@kasperisager kasperisager requested a review from Jym77 October 6, 2020 08:58
@kasperisager kasperisager merged commit 57abdd1 into master Oct 6, 2020
@kasperisager kasperisager deleted the graph-traversal branch October 6, 2020 09:53
kasperisager added a commit that referenced this pull request Oct 19, 2020
* master: (190 commits)
  Bump jest from 26.5.2 to 26.5.3 (#453)
  Bump @types/jquery from 3.5.2 to 3.5.3 (#455)
  Bump webdriverio from 6.6.2 to 6.6.6 (#458)
  Bump @types/node from 14.11.7 to 14.11.10 (#460)
  Bump @types/react from 16.9.51 to 16.9.53 (#461)
  Bump mdn-browser-compat-data from 1.0.40 to 1.1.0 (#451)
  Bump webdriverio from 6.6.0 to 6.6.2 (#449)
  Implement style resolution for stateful pseudo classes (#448)
  Bump @types/node from 14.11.5 to 14.11.7 (#450)
  Bump @angular/core from 10.1.4 to 10.1.5 (#446)
  Fix several `Element#tabIndex()` cases (#445)
  Implement presentational role inheritance (#443)
  Improve handling of cyclic `aria-owns` references (#442)
  Bump jest from 26.5.0 to 26.5.2 (#441)
  Bump webdriverio from 6.5.2 to 6.6.0 (#440)
  Implement traversal API for `Graph` (#426)
  Exclude from the accessibility tree text nodes of parent elements with `visibility: hidden` (#437)
  Implement step 2H of the name computation (#430)
  Bump @types/node from 14.11.2 to 14.11.5 (#436)
  Bump @types/node from 14.11.2 to 14.11.4 (#431)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Backwards-incompatible change that touches public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants