quailjs / quail

Accessibility testing in the browser and on the server.
http://quailjs.org
Other
300 stars 44 forks source link

Plugable Quail Architecture #369

Closed WilcoFiers closed 8 years ago

WilcoFiers commented 9 years ago

This proposal is based on a discussion with KING, Jesse, AccessibilityNL and CKSource. A number of issues have come up which can all be boiled down to the same issue, a limited flexibility in the architecture of Quail.

In brief, these issues are:


A potential approach for all of these issues could be to break Quail up into different components. The core would only be focused on loading assessments, running them, and reporting their findings. All the assessments that are currently in Quail will be moved to separate Quail-* packages.

Quail core would need a standardized way of installing and running these external packages. This method should be transparent, flexible and easy to pick up. This would make it possible for developers to make their own assessment libraries for Quail.

The following benefits would be gained by using this approach:

There are a number of disadvantages to this approach too:

jessebeach commented 9 years ago

The goal is commendable.

This topic is better represented as a Milestone that groups actionable tasks. We could never close this task because it has too many unknowns.

mlewand commented 9 years ago

That's a good idea. It would make sense to split it into a separte npm packages.

A question that bothers me is that utils functions would also need its separate package.

The point here is that they should not be bundled within e.g. quail-assessments-a11y module, as any other might want to reuse these utils.

Eventually we might also need a way to add Quail components:

Then we'll during building process we'll use browserify to merge modules into file executable in target browsers.

We'd be very happy to see it.

WilcoFiers commented 9 years ago

Excellent question. I'd go further and split up assessments-a11y as well. I expect there are logical ways to group some of these together, like WCAG conformance assessments, precontition assessments, and probably a few more. I haven't spend much time on this idea yet. I think some of these functions should stay and core while others can move into their own packages. Quail is and will stay an accessibility testing tool, so having features in core that support that bases makes sense. But when we start loading external dependencies, these are probably best put only in the packages that rely on them.

jessebeach commented 8 years ago

I've just refactored Quail into a modular build structure. I can now start separating into individual projects.

jessebeach commented 8 years ago

We've got the pluggable architecture now in master.

https://github.com/quailjs/quail/pull/386

We've got a separate ticket to pull out the KING tests.