Skip to content

Comments

Merge with upstream#4

Merged
kabel merged 13 commits intounl:masterfrom
squizlabs:master
Dec 5, 2014
Merged

Merge with upstream#4
kabel merged 13 commits intounl:masterfrom
squizlabs:master

Conversation

@mfairchild365
Copy link

No description provided.

Luke Wright 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.
kabel added a commit that referenced this pull request Dec 5, 2014
@kabel kabel merged commit 9de66d4 into unl:master Dec 5, 2014
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.

2 participants