Merged
Conversation
added 13 commits
November 10, 2014 12:41
element being tested (if applicable) and its ID if set. If there is an ID, it will be prefixed by "#". eg. "WARNING|foo.bar.baz|input|#input_id1|Sample warning message."
Currently this is just a test file, with no logic or assertions. Currently thinking up a format for assertions and description.
1. Responsibility for tallying the messages is sent to the outer file
(HTMLCS_Run).
.. The inner file will now produce log messages starting with
"[HTMLCS] " which will be suppressed until the end (except for the
"done").
.. Report will be produced at the end when "done" is called.
2. Added an extra report type, which shows the report in a neat table.
.. Add extra parameter "table" to switch to this.
.. By default it will continue to use the "pipe" format, with the
extra two fields now added (for node name and ID).
(TODO: modulising something like this.)
1. Add Section508 support. 2. Reduce the page evaluation to a single line, because page.evaluate these days takes parameters to be sent to the sandboxed function.
See the changes to the SC 4.1.2 sample test file for an example of what should be added as a comment to the test file to expose its name. This script will read that file through the file system, read its test name, the standard to use, and the assertions. Then it will run the file through its web browser and match the messages up against the assertions. Assertions should be written in the following format: Assert: [No] Level Code [on #Id] Where Level is either "Error", "Warning", or "Notice" (not case sensitive). Code is the message code with "*" serving as a wildcard (typically used at the start of the code), Including "on #Id" targets an element with a particular ID (if omitted, the assertion will be triggered on any element); the "on" is not case-sensitive, and the "No" prefix (not case sensitive) inverts the condition - such that if the condition is true it will fail. Normally, a condition will fail unless it is triggered at least once. Method of invocation: $ cd Contrib/PhantomJS $ phantomjs HTMLCS_Test.php [test path] where [test path] is based on a root of the Tests/ directory.
1. File rename so the file name actually has what's being tested. 2. Add a second select box that has Option Selected, to ensure it shows no error at all.
Now correctly emits a warning (H65 or ARIA6) when the title or aria-label attribute is specified but empty. Hidden field WARNING now has a sub code F68.Hidden. The final "this field is not labelled" is now an ERROR, not a WARNING. A test file has been written for this (1_3_1_Labels.html), currently only handling text fields (and fields without an input type, defaulting to text) but covering explicit labels, wrapped labels, title attr, aria-label, and aria-labelledby.
"hidden" input element type. Throw a warning if it has a label, ignore otherwise. Test WCAG2/1_3_1_Labels_Hidden added to validate this. Addresses "absent label on hidden attributed fields" concerns as per issue #80.
1. Allow test file arguments to have a .html extension. 2. Add a shell script that will run all available test files.
HTMLCS_Test.js also references the old runner file still in the PhantomJS contrib folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.