From b08024d4b8f76b86834137363a8985d0bb8df579 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 5 Oct 2014 00:28:35 -0400 Subject: [PATCH] Bootlint: Always set a type value for buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default is the submit behaviour which isn’t indicated in the demos that excluded the attribute --- Gruntfile.coffee | 1 - src/plugins/data-inview/data-inview-en.hbs | 16 ++++++++-------- src/plugins/data-inview/data-inview-fr.hbs | 12 ++++++------ src/plugins/lightbox/lightbox-en.hbs | 8 ++++---- src/plugins/lightbox/lightbox-fr.hbs | 10 +++++----- src/plugins/multimedia/multimedia-en.hbs | 8 ++++---- src/plugins/multimedia/multimedia-fr.hbs | 12 ++++++------ src/plugins/overlay/overlay-en.hbs | 20 ++++++++++---------- src/plugins/overlay/overlay-fr.hbs | 18 +++++++++--------- src/polyfills/meter/meter-en.hbs | 8 ++++---- src/polyfills/meter/meter-fr.hbs | 8 ++++---- src/polyfills/progress/progress-en.hbs | 4 ++-- src/polyfills/progress/progress-fr.hbs | 4 ++-- 13 files changed, 64 insertions(+), 65 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index a44b2445257..c3d5fdbf809 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -929,7 +929,6 @@ module.exports = (grunt) -> # We recommend handling this through the server headers so it never appears in the markup " is missing X-UA-Compatible tag that disables old IE compatibility modes" # TODO: The rules below should be resolved - "Always set a `type` on ` +
  • - +
  • - +
  • @@ -162,13 +162,13 @@ wb.doc.on( "all.wb-inview partial.wb-inview none.wb-inview", function( diff --git a/src/plugins/data-inview/data-inview-fr.hbs b/src/plugins/data-inview/data-inview-fr.hbs index 81807a28d92..759fdf8fbc4 100644 --- a/src/plugins/data-inview/data-inview-fr.hbs +++ b/src/plugins/data-inview/data-inview-fr.hbs @@ -145,13 +145,13 @@ wb.doc.on( "all.wb-inview partial.wb-inview none.wb-inview", function( @@ -162,13 +162,13 @@ wb.doc.on( "all.wb-inview partial.wb-inview none.wb-inview", function( diff --git a/src/plugins/lightbox/lightbox-en.hbs b/src/plugins/lightbox/lightbox-en.hbs index eb26c3865b0..5410482d5b5 100644 --- a/src/plugins/lightbox/lightbox-en.hbs +++ b/src/plugins/lightbox/lightbox-en.hbs @@ -103,7 +103,7 @@ - + @@ -141,7 +141,7 @@ </header> <div class="modal-body"> ... - <button class="btn btn-primary popup-modal-dismiss">Close modal popup</button> + <button class="btn btn-primary popup-modal-dismiss" type="button">Close modal popup</button> </div> </section> </li> @@ -412,7 +412,7 @@ - +

    Code

    @@ -428,7 +428,7 @@ <option value="4">Modal popup</option> <option value="5">Image gallery</option> </select> -<button id="lbx-open-btn">Open lightbox</button> +<button id="lbx-open-btn" type="button">Open lightbox</button>
    diff --git a/src/plugins/lightbox/lightbox-fr.hbs b/src/plugins/lightbox/lightbox-fr.hbs index b3907507e56..8251a2699ea 100644 --- a/src/plugins/lightbox/lightbox-fr.hbs +++ b/src/plugins/lightbox/lightbox-fr.hbs @@ -102,7 +102,7 @@

    Lien - apparence par défaut

    - +
    @@ -145,7 +145,7 @@ </header> <div class="modal-body"> ... - <button class="btn btn-primary popup-modal-dismiss">Fermer le contenu superposé modal</button> + <button class="btn btn-primary popup-modal-dismiss" type="button">Fermer le contenu superposé modal</button> </div> </section> </div> @@ -308,7 +308,7 @@ </li> </ul> </section> - + @@ -417,7 +417,7 @@ - +

    Code

    @@ -433,7 +433,7 @@ <option value="4">Contenu superposé modal</option> <option value="5">Galerie d'images</option> </select> -<button id="lbx-open-btn">Ouvrir le contenu superposé « Lightbox »</button> +<button id="lbx-open-btn" type="button">Ouvrir le contenu superposé « Lightbox »</button>
    diff --git a/src/plugins/multimedia/multimedia-en.hbs b/src/plugins/multimedia/multimedia-en.hbs index ce560e4737e..d54252ce5ac 100644 --- a/src/plugins/multimedia/multimedia-en.hbs +++ b/src/plugins/multimedia/multimedia-en.hbs @@ -217,8 +217,8 @@ - - + +

    Looking for a Job (Transcript)

    @@ -230,8 +230,8 @@ <source type="video/mp4" src="http://video2.servicecanada.gc.ca/video/boew-wet/te-lj-eng.mp4" /> <track src="#inline-captions" kind="captions" data-type="text/html" srclang="en" label="English" /> </video> - <button class="btn btn-info cuepoint" data-cuepoint="45s">Cue point - 45s</button> - <button class="btn btn-info cuepoint" data-cuepoint="01:10">Cue point - 01:10</button> + <button class="btn btn-info cuepoint" data-cuepoint="45s" type="button">Cue point - 45s</button> + <button class="btn btn-info cuepoint" data-cuepoint="01:10" type="button">Cue point - 01:10</button> <figcaption> <p>Looking for a Job (<a href="http://www.servicecanada.gc.ca/eng/video/lj.shtml">Transcript</a>)</p> </figcaption> diff --git a/src/plugins/multimedia/multimedia-fr.hbs b/src/plugins/multimedia/multimedia-fr.hbs index a00eb1e789f..4aede55e0b1 100644 --- a/src/plugins/multimedia/multimedia-fr.hbs +++ b/src/plugins/multimedia/multimedia-fr.hbs @@ -214,7 +214,7 @@ </figcaption> </figure> -
    +

    MPEG4 (H264 + AAC) Source avec marqueurs temporels (cue points)

    Cet exemple illustre l'utilisation de boutons pour naviguer à des marqueurs temporels dans une vidéo.

    @@ -223,13 +223,13 @@ - - + +

    Trouver un emploi (Transcription)

    - +
    Visualiser le code
    <figure class="wb-mltmd">
    @@ -237,8 +237,8 @@
     		<source type="video/mp4" src="http://video2.servicecanada.gc.ca/video/boew-wet/te-lj-fra.mp4" />
     		<track src="#inline-captions" kind="captions" data-type="text/html" srclang="en" label="Français" />
     	</video>
    -	<button class="btn btn-info cuepoint" data-cuepoint="45s">Marqueur temporel - 45s</button>
    -	<button class="btn btn-info cuepoint" data-cuepoint="01:10">Marqueur temporel - 01:10</button>
    +	<button class="btn btn-info cuepoint" data-cuepoint="45s" type="button">Marqueur temporel - 45s</button>
    +	<button class="btn btn-info cuepoint" data-cuepoint="01:10" type="button">Marqueur temporel - 01:10</button>
     	<figcaption>
     		<p>Trouver un emploi (<a href="http://www.servicecanada.gc.ca/fra/video/te.shtml">Transcription</a>)</p>
     	</figcaption>
    diff --git a/src/plugins/overlay/overlay-en.hbs b/src/plugins/overlay/overlay-en.hbs
    index 19b773dd474..3b522213ac5 100644
    --- a/src/plugins/overlay/overlay-en.hbs
    +++ b/src/plugins/overlay/overlay-en.hbs
    @@ -65,7 +65,7 @@
     		<h2 class="modal-title">Top bar</h2>
     	</header>
     	...
    -</section>
    +</section>
  • @@ -110,7 +110,7 @@ </header> <div class="modal-body"> ... - <button class="btn btn-primary popup-modal-dismiss">Close modal popup</button> + <button class="btn btn-primary popup-modal-dismiss" type="button">Close modal popup</button> </div> </section> @@ -164,7 +164,7 @@ - +

    Code

    @@ -268,13 +268,13 @@ wb.doc.on( "click vclick", "#overlay-open-btn", function( event ) {
    • - +
    • - +
    • - +
    @@ -285,13 +285,13 @@ wb.doc.on( "click vclick", "#overlay-open-btn", function( event ) {
    • - +
    • - +
    • - +
  • @@ -338,7 +338,7 @@ wb.doc.on( "click vclick", "#overlay-open-btn", function( event ) { - + diff --git a/src/plugins/overlay/overlay-fr.hbs b/src/plugins/overlay/overlay-fr.hbs index 67df70df2fd..9bf83644b6f 100644 --- a/src/plugins/overlay/overlay-fr.hbs +++ b/src/plugins/overlay/overlay-fr.hbs @@ -164,7 +164,7 @@ - +

    Code

    @@ -181,7 +181,7 @@ <option value="cs-plein-ecran">Contenu superposé plein écran</option> <option value="en-tete-cache">Contenu superposé plein écran - En-tête caché</option> </select> -<button id="overlay-open-btn">Open overlay</button> +<button id="overlay-open-btn" type="button">Ouvrir le contenu superposé</button>
    @@ -268,13 +268,13 @@ wb.doc.on( "click vclick", "#overlay-open-btn", function( event ) {
    @@ -285,13 +285,13 @@ wb.doc.on( "click vclick", "#overlay-open-btn", function( event ) { @@ -339,7 +339,7 @@ wb.doc.on( "click vclick", "#overlay-open-btn", function( event ) {

    Lien - apparence par défaut

    - + diff --git a/src/polyfills/meter/meter-en.hbs b/src/polyfills/meter/meter-en.hbs index e0b4d0430b3..9d467db3ca8 100644 --- a/src/polyfills/meter/meter-en.hbs +++ b/src/polyfills/meter/meter-en.hbs @@ -71,8 +71,8 @@ 15% (too low) - - + + 150 @@ -123,8 +123,8 @@ <td><meter min="100" low="120" value="115" max="200" high="180">15% (too low)</meter></td> </tr> <tr> - <td colspan="3"><button class="btn btn-default" id="decreaseMeter">Decrease</button></td> - <td colspan="3"><button class="btn btn-default" id="increaseMeter">Increase</button></td> + <td colspan="3"><button class="btn btn-default" id="decreaseMeter" type="button">Decrease</button></td> + <td colspan="3"><button class="btn btn-default" id="increaseMeter" type="button">Increase</button></td> <td><meter id="updateTest" min="100" low="120" value="150" max="200" high="180"><span class="wb-inv">150</span></meter> </tr> </tbody> diff --git a/src/polyfills/meter/meter-fr.hbs b/src/polyfills/meter/meter-fr.hbs index a4ea3b4f6ed..9f512a352f6 100644 --- a/src/polyfills/meter/meter-fr.hbs +++ b/src/polyfills/meter/meter-fr.hbs @@ -71,8 +71,8 @@ 15 % (trop bas) - - + + 150 @@ -123,8 +123,8 @@ <td><meter min="100" low="120" value="115" max="200" high="180">15 % (trop bas)</meter></td> </tr> <tr> - <td colspan="3"><button class="btn btn-default" id="decreaseMeter">Diminuer</button></td> - <td colspan="3"><button class="btn btn-default" id="increaseMeter">Augmenter</button></td> + <td colspan="3"><button class="btn btn-default" id="decreaseMeter" type="button">Diminuer</button></td> + <td colspan="3"><button class="btn btn-default" id="increaseMeter" type="button">Augmenter</button></td> <td><meter id="updateTest" min="100" low="120" value="150" max="200" high="180"><span class="wb-inv">150</span></meter> </tr> </tbody> diff --git a/src/polyfills/progress/progress-en.hbs b/src/polyfills/progress/progress-en.hbs index c399bbf659d..d20f0ba45a1 100644 --- a/src/polyfills/progress/progress-en.hbs +++ b/src/polyfills/progress/progress-en.hbs @@ -47,7 +47,7 @@ 100% - + 82% @@ -82,7 +82,7 @@ <td><progress value="500" max="500"><span class="wb-inv">100%</span></progress></td> </tr> <tr> - <td colspan="2"><button class="btn btn-default" id="updateProgress">Update</button></td> + <td colspan="2"><button class="btn btn-default" id="updateProgress" type="button">Update</button></td> <td><progress id="updateTest" value="82" max="100"><span class="wb-inv">82%</span></progress></td> </tr> </tbody> diff --git a/src/polyfills/progress/progress-fr.hbs b/src/polyfills/progress/progress-fr.hbs index ae7a3794e0c..d6c40a57482 100644 --- a/src/polyfills/progress/progress-fr.hbs +++ b/src/polyfills/progress/progress-fr.hbs @@ -45,7 +45,7 @@ 100 % - + 82% @@ -80,7 +80,7 @@ <td><progress value="500" max="500"><span class="wb-inv">100 %</span></progress></td> </tr> <tr> - <td colspan="2"><button class="btn btn-default" id="updateProgress">Réactualiser</button></td> + <td colspan="2"><button class="btn btn-default" id="updateProgress" type="button">Réactualiser</button></td> <td><progress id="updateTest" value="82" max="100"><span class="wb-inv">82%</span></progress></td> </tr> </tbody>