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
Input types are much too specific and lead to confusion #109
Comments
My take on this is that it is likely unclear to many non-developers what a "test subject type" actually entails as a lot of implicit assumptions underpin the choice of test subject type. In the case of a rule that verifies color contrast, for example, it is obvious to a developer that the test subject type would be the rendered page. The "why" of it is missing though; computing styles and cascade is required in order to determine the fore- and background color of a given element, hence the need to render the page before running the rule. What I would like to suggest is something along the lines of a section describing "requirements" instead. Based on these requirements, rule implementors can then themselves determine how to run a given rule. For example:
What I'm thinking is that it is easier for people to answer the question "what does my rule require?" than it is answering "on what kind of input should my rule be run?". |
I agree with @kasperisager and believe these would fit better as a kind of Requirement for a test rule. Also we should consider removing the more fluffy "Scripts" and "Templates" from the list of test subject types, as they are more likely to cause confusion than to help. If you come to need these types when developing rules, you will be able to specify them then to properly fit the purpose of your rule. |
SI will create a proposal by October 19th for the TF to review. |
As mentioned above, Siteimprove would like to see this section more focused on the actual requirements for a Rule and then leave it up to the implementers to decide on the input type, as long as it lives up to the specified requirements. 4. Input RequirementsWeb pages, including publications and applications, go through many different stages before they are rendered to the end user. For example, PHP may be used to put various pieces of content into a template. That template is then sent as an HTML text document to a web browser. The browser in turn parses it and turns it into a DOM tree before rendering it to the screen. Accessibility tests could be run at each of these stages. It is therefore important to specify the input requirements that an ACT Rule expects. The ACT Rule must state the kind of input that is required for the rule to give the expected results. Examples of input requirements:
Other input requirements are possible. In those cases the ACT Rule MUST include a description of the input requirement, or a reference to that description. Rule authors are encouraged to specify new input requirements if necessary. Source HTML must be availableSource HTML is a textual representation of the structure of a document. It is necessary to have access to it for parsing it or validating it. The DOM must be constructedDOM (Document Object Model) represents the document as nodes and objects. It provides a tree representation of the structure of the document and the API for traversing and modifying this representation. Access to it is necessary for identifying the nodes and its properties and for testing the relationships between nodes. CSS styles must be computedCSS is a stylesheet language used to describe the presentation of the HTML or XML documents. Computed CSS describes how the nodes should be rendered and it is the result of applying stylesheets to the document, accounting for cascade and for inherited, relative, media query-specific and for other properties that might be dependent on some other factor than the CSS declaration itself. Access to the computed CSS is necessary to test the resulting visual representation of the document. Elements must be laid out on the pageThe document (and potentially stylesheets) specify how the elements should be positioned. Access to the layout is required to be able to test how are the elements positioned in relation to each other and to the viewport or the document. Images must be fully loadedAccess to the content of the images is necessary to test their impact on the layout and rendering of the document as well as for testing the actual content of the images. HTTP headers must be availableHTTP headers are the metadata of the data transferred using the HTTP protocol from the server that hosts the website to the user's browser. Access to HTTP headers is necessary for tests involving the transferred metadata, such as the language code of the document. Input events can be triggeredIt must be possible to trigger input events (such as key presses or pointer events) to be able to test the behavior or presentation of the document in various states. Unparsed templates must be availableTemplate is the source code which is used to generate the final source code (for example HTML). Access to the template is necessary if testing is required before generating the final source code. Script AST must be availableScript AST (Abstract Syntax Tree) is a representation of a structure of the script's source code. It might be necessary to be able to test the code statically (without its execution). Examples:Rule: Visible link focus (2.4.7 Focus visible)Input requirements:
Possible implementation options:
Rule: Form validation (3.3.1 Error identification)Input requirements:
Possible implementation options:
Rule: Verification of template (
|
I think that in most cases these are implementation details that may not be the only way to implement the rules and I would therefore caution against becoming too explicit and thereby blocking technology enhancements or innovation from implementing this standard |
@WilcoFiers Here's my take on a replacement for section 5 "Test Subject Types": Aspects Under TestACT Rules can operate on different aspects of the subject being tested. For example, rendering a web page to an end user involves multiple different technologies, some or all of which may be of interest to an ACT Rule. Some rules may need to operate directly on the HTTP messages exchanged between a server and a client, while others need to operate on the DOM tree exposed by a web browser. Some rules may even need to operate on several aspects simultaneously such as both the HTTP messages and the DOM tree. Each ACT Rule MUST include a description of all the aspects under test by the rule. Some of these aspects are already well defined within the context of web content, such as HTTP messages, DOM tree, and computed CSS styling, and do not warrant a detailed description. Other aspects may not be well defined or even specific to web content. In these cases, an ACT Rule SHOULD include a detailed description, or a reference to one, of the aspect in question. |
Will add list of examples, including hearing and vision, as well as specify that each aspect is discrete. |
This was handled in pull request #157. |
Wilco - the input types are over complicating the spec
[10:19] == skotkjerra [~skotkjerra@public.cloak] has quit [Ping timeout: 180 seconds]
[10:19] ... the reason we have these 5, I have seen tests use all these types
[10:20] ... dom tree tests are doing this (react has own dom library)
[10:20] ... template and script testing; more speculative
[10:21] ... can analyze JS code
[10:21] ... all of them are valid environments
[10:21] ... what are your thought on this
[10:22] Stein Erik - in our world it is tested in browser or not
[10:22] <anne_thyme> q+
[10:22] * Zakim sees anne_thyme on the speaker queue
[10:22] q+
[10:22] * Zakim sees anne_thyme, tobias on the speaker queue
[10:22] ... your arguments are fair
[10:22] ack a
[10:22] * Zakim sees tobias on the speaker queue
[10:22] <anne_thyme> q-
[10:22] * Zakim sees tobias on the speaker queue
[10:22] Tobias - what Wilco said makes sense
[10:22] ... didn
[10:23] t see that these were common types
[10:24] ... people not technical, this could be confusing and we may want to elaborate and add examples
[10:24] Wilco - should we add an issue to look at this
The text was updated successfully, but these errors were encountered: