Skip to content

Commit

Permalink
Merge branch '4.1' of github.com:unl/wdntemplates into 4.1
Browse files Browse the repository at this point in the history
Conflicts:
	wdn/templates_4.1/includes/globalfooter.html
  • Loading branch information
skoolbus39 committed Jan 5, 2016
2 parents 63a520d + 577c250 commit 15ac443
Show file tree
Hide file tree
Showing 2,449 changed files with 94 additions and 146,730 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
/wdn/templates_*/scripts/js-css/*.css
/wdn/templates_*/scripts/plugins/qtip/wdn.qtip.css
/wdn/templates_*/scripts/plugins/ui/css/jquery-ui-wdn.css
/tests/config.inc.php
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_install:
before_script:
# install `pa11y`
- npm install
- npm install pa11y
- npm install pa11y@2.4.4
- npm install grunt-cli
# build the templates
- ./node_modules/grunt-cli/bin/grunt
Expand Down
2 changes: 1 addition & 1 deletion VERSION_DEP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.0-rc.2
4.1.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wdntemplates",
"version": "4.1.0-rc.2",
"version": "4.1.0",
"description": "Web Framework for the UNLedu website.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion sharedcode/navigation.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ul>
<li><a href="http://www.unl.edu/" title="UNL homepage">UNL</a>
<ul>
<li><a href="http://www.unl.edu/ucomm/aboutunl/" title="Summary of the University">About UNL</a></li>
<li><a href="http://www.unl.edu/about-unl/" title="Summary of the University">About UNL</a></li>
<li><a href="http://newsroom.unl.edu/" title="Official news and information from the University of Nebraska-Lincoln">News</a></li>
<li><a href="http://www.unl.edu/ucomm/admin/">Administrative Units</a></li>
<li><a href="http://www.unl.edu/ucomm/depts/">Colleges &amp; Departments</a></li>
Expand Down
27 changes: 20 additions & 7 deletions tests/Accessibility/accessibility.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ Validate all example pages for accessibility
//Load composer
require_once dirname(__FILE__) . '/../../build/vendor/autoload.php';

if (file_exists(__DIR__ . '/../config.inc.php')) {
require_once __DIR__ . '/../config.inc.php';
}

class AccessibilityTester {
protected $examples_directory = '';
protected $wrapper_html;
public static $base_url = 'http://localhost/';

public function __construct()
{
$this->examples_directory = dirname(__FILE__) . '/../../wdn/templates_4.0/examples/';
$this->examples_directory = dirname(__FILE__) . '/../../wdn/templates_4.1/examples/';
$this->wrapper_html = file_get_contents($this->examples_directory . 'index.shtml');
}

Expand All @@ -35,10 +40,11 @@ class AccessibilityTester {
*/
protected function checkExample($file) {
echo "checking: " . $file . PHP_EOL;
$url = 'http://localhost/tests/Accessibility/tmp/' . $file . '.shtml';
$url = self::$base_url . 'tests/Accessibility/tmp/' . $file . '.shtml';
$command = 'pa11y ' .
'-r json ' .
'-s WCAG2AA ' .
'-w 500 ' .
'--config ' . dirname(__FILE__) . '/pa11y.json ' .
'--htmlcs "http://webaudit.unl.edu/plugins/metric_pa11y/html_codesniffer/build/HTMLCS.js" ' .
escapeshellarg($url);
Expand Down Expand Up @@ -68,10 +74,12 @@ class AccessibilityTester {

//Save to an example file.
file_put_contents(__DIR__ . '/tmp/' . $file . '.shtml', \HTML5::saveHTML($new_dom));

//Run pa11y on the test page
$json = exec($command);

$output_file = __DIR__ . '/output.json';
$result = exec($command . ' > ' . $output_file);
$json = file_get_contents($output_file);

if (!$data = json_decode($json, true)) {
return false;
}
Expand All @@ -80,8 +88,13 @@ class AccessibilityTester {
if ($result['type'] != 'error') {
continue;
}

$errors[] = $result['code'] . ' -- ' . $result['context'];

$errors[] = $url
. "\r\n\t code: " . $result['code']
. "\r\n\t message: " . $result['message']
. "\r\n\t selector: " . $result['selector']
. "\r\n\t context: " . $result['context']
. "\r\n------------\r\n";
}

return $errors;
Expand Down
2 changes: 2 additions & 0 deletions tests/config.sample.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
AccessibilityTester::$base_url = 'http://example.unl.edu/wdn_path/';
17 changes: 0 additions & 17 deletions vagrant/dev/Vagrantfile

This file was deleted.

2 changes: 0 additions & 2 deletions vagrant/dev/apache_custom_fragment

This file was deleted.

Loading

0 comments on commit 15ac443

Please sign in to comment.