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

feat: Separation of concerns #19

Merged
merged 28 commits into from
Oct 11, 2019
Merged

feat: Separation of concerns #19

merged 28 commits into from
Oct 11, 2019

Conversation

matatk
Copy link
Owner

@matatk matatk commented Sep 2, 2019

Include just the test suite and minimal support code in this repository.

TODO:

  • Use "fragment" instead of "combined"?
  • The code that exposes the tests (not yet in this PR branch publicly at the time of writing) has a lot of duplication which needs to be factored out.
  • [ ] Try removing t.end() calls (from the docs, they may not be necessary).
  • Documentation! (i.e. update the README)
  • Set up the other repo (with the runner/tools) and link to it from the README
  • Remember to note that this is a breaking change in the commit message.
  • Remember to change the repo description on GitHub after merge.

Closes #18

@matatk matatk changed the title [WIP] Separation of concerns [WIP] feat: Separation of concerns Sep 2, 2019
matatk and others added 10 commits September 3, 2019 00:02
* Simplify the test suite info section generally.
* Remove the first heading within "Test suite info".
* Clarify the two formats of test suite provided.
* Obfuscate example path to fixture (was Mac-specific)
Finding clarity is harder than was anticipated :-).
@matatk
Copy link
Owner Author

matatk commented Sep 6, 2019

@xi I was wondering if you might have the cycles to try this out?

@xi
Copy link

xi commented Sep 7, 2019

Looks much cleaner now! I particularily like that installations does no longer pull in dependencies that I do not actually need. A minor nitpick is that I would prefer a flat list of landmarks instead of the "contains" structure in the expectations. Other than that this is great!

@matatk
Copy link
Owner Author

matatk commented Sep 8, 2019

@xi thanks for trying it and getting back to me so quickly. Glad to hear the changes are helpful :-). It was satisfying to remove the run-time dependencies :-).

Regarding “contains”: I did that because I’m anticipating adding headings and articles to the test suite at some point, and I thought that this structure would be clearer for when that happens. It describes the expectations without containing any implementation details and, being a tree, it mirrors the DOM's structure. (Since you mention it, though, I am thinking about this again.)

The Landmarks extension uses a different format too: everything is in a list and a “depth” field indicates nesting. I wrote and tested a converter for Landmarks and a converter for a11y-outline—might that be of use? There are tests for the converters. I'm planning to move all of that, and more, to a separate repo that's more experimental.

@xi
Copy link

xi commented Sep 9, 2019

If you test for the correct hierarchy you also have to deal with aria-owns (which is a beast) at some point. The HTML5 outline algorithm is still not implemented in any meaningful way. So the hierarchy part is a bit fuzzy and I think it's best to test it separately for now.

But that is really not related to this pull request. Should I open a separate issue?

@matatk
Copy link
Owner Author

matatk commented Sep 17, 2019

@xi that does sound to me like a separate issue, I'm not sure that I am understanding correctly—if we're only testing for the landmarks hierarchy at the moment, I'm not sure that aria-owns comes into it. I wasn't aware that it might be related to headings/articles, though haven't done much research on that yet.

My understanding is that a11y-outline/aria-api uses some sort of tree structure internally too (that’s what I used for the basis of the converter tests). I may be misunderstanding though. I agree that’s out-of-scope for now, though.

I was wondering if using the word “combined” to describe the combined HTML fragment tests is sub-optimal. It may sound like they represent a complete set of tests, where in fact two are missing. I thought maybe calling them “fragment” tests (and changing the directory name too) instead may be clearer. Do you have a strong preference either way?

@matatk
Copy link
Owner Author

matatk commented Oct 2, 2019

It occurred to me that the "combined" tests could be changed to "fragment" ones later on, so it's not key to this PR. I will need to make a new repo for the code that this PR removes from this one, and aim to do that soon, so I can merge this. Thanks again @xi for your feedback so far :-).

So that the PR can be merged.
@matatk matatk changed the title [WIP] feat: Separation of concerns feat: Separation of concerns Oct 11, 2019
@matatk matatk merged commit af47029 into master Oct 11, 2019
@matatk matatk deleted the separation-of-concerns branch October 11, 2019 08:40
@matatk
Copy link
Owner Author

matatk commented Oct 11, 2019

Finally merged, tagged and released :-).

This is a breaking change, but as we're still at 0.x—i.e. in initial development—I just bumped to 0.4.

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.

Separation of concerns
2 participants