From bb5be0a2f9b9ed789e79603c106e8d2c7cf62305 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 12 Aug 2013 15:01:06 -0700 Subject: [PATCH 1/6] add HTML5 validation of docs pages to the build --- .gitignore | 3 +++ .travis.yml | 1 + Gruntfile.js | 20 +++++++++++++++++++- package.json | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0d74d48f..5c7f0519 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,9 @@ nbproject *.komodoproject .komodotools +# grunt-html-validation +validation-staus.json + # Folders to ignore .hg .svn diff --git a/.travis.yml b/.travis.yml index 5ed6e43e..9f237188 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: node_js node_js: - 0.8 before_script: + - gem install jekyll - npm install -g grunt-cli env: global: diff --git a/Gruntfile.js b/Gruntfile.js index c15b4ad1..576c6374 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -102,6 +102,19 @@ module.exports = function(grunt) { } }, + jekyll: { + docs: {} + }, + + validation: { + options: { + reset: true, + }, + files: { + src: ["_gh_pages/**/*.html"] + } + }, + watch: { src: { files: '<%= jshint.src.src %>', @@ -127,12 +140,17 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-html-validation'); + grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('browserstack-runner'); + // Docs HTML validation task + grunt.registerTask('validate-docs', ['jekyll', 'validation']); + // Test task. - var testSubtasks = ['jshint', 'qunit']; + var testSubtasks = ['jshint', 'qunit', 'validate-docs']; // Only run BrowserStack tests under Travis if (process.env.TRAVIS) { // Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key diff --git a/package.json b/package.json index 5f142831..efcc5af0 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ , "grunt-contrib-uglify": "~0.2.2" , "grunt-contrib-qunit": "~0.2.2" , "grunt-contrib-watch": "~0.5.1" + , "grunt-html-validation": "git://github.com/praveenvijayan/grunt-html-validation.git" + , "grunt-jekyll": "~0.3.8" , "grunt-recess": "~0.3.3" , "browserstack-runner": "~0.0.11" } From 3ec793072072773c2d834d99d7e4307629c18058 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 12 Aug 2013 18:09:25 -0700 Subject: [PATCH 2/6] add ARIA roles to Dropdown examples in Components docs --- components.html | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/components.html b/components.html index 39039a44..ceb74568 100644 --- a/components.html +++ b/components.html @@ -20,11 +20,11 @@ base_url: "../" @@ -32,11 +32,11 @@ base_url: "../" {% endhighlight %} @@ -54,22 +54,22 @@ base_url: "../"
{% highlight html %} {% endhighlight %} @@ -79,17 +79,17 @@ base_url: "../" {% highlight html %} {% endhighlight %} From b33989a97791560f064e723cfff2ec5b4ac65eba Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 12 Aug 2013 18:59:58 -0700 Subject: [PATCH 3/6] add src attribute to holder.js-powered s so that they validate use `data:` URL of empty invalid PNG: src="data:image/png;base64," --- components.html | 30 +++++++++++++++--------------- css.html | 6 +++--- javascript.html | 12 ++++++------ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/components.html b/components.html index ceb74568..d213030b 100644 --- a/components.html +++ b/components.html @@ -1819,22 +1819,22 @@ body { padding-bottom: 70px; } @@ -1856,7 +1856,7 @@ body { padding-bottom: 70px; }
- +

Thumbnail label

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

@@ -1866,7 +1866,7 @@ body { padding-bottom: 70px; }
- +

Thumbnail label

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

@@ -1876,7 +1876,7 @@ body { padding-bottom: 70px; }
- +

Thumbnail label

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

@@ -2148,7 +2148,7 @@ body { padding-bottom: 70px; }
- Generic placeholder image + Generic placeholder image

Media heading

@@ -2157,14 +2157,14 @@ body { padding-bottom: 70px; }
- Generic placeholder image + Generic placeholder image

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
- Generic placeholder image + Generic placeholder image

Media heading

@@ -2192,7 +2192,7 @@ body { padding-bottom: 70px; }