diff options
| author | Bardi Harborow <[email protected]> | 2016-11-13 02:12:58 +1100 |
|---|---|---|
| committer | Bardi Harborow <[email protected]> | 2016-11-13 02:34:18 +1100 |
| commit | b9e7cef9653ea803262915a1ed64722d355f99cc (patch) | |
| tree | 973694ba40492e3f341d6a10b7000f907b998803 /js/tests/visual/button.html | |
| parent | 93ba9ac629a29bb8709989ba4be8a26b0b6d87d5 (diff) | |
| download | bootstrap-b9e7cef9653ea803262915a1ed64722d355f99cc.tar.xz bootstrap-b9e7cef9653ea803262915a1ed64722d355f99cc.zip | |
Update visual tests.
Diffstat (limited to 'js/tests/visual/button.html')
| -rw-r--r-- | js/tests/visual/button.html | 112 |
1 files changed, 49 insertions, 63 deletions
diff --git a/js/tests/visual/button.html b/js/tests/visual/button.html index 570c9addd..e2364d781 100644 --- a/js/tests/visual/button.html +++ b/js/tests/visual/button.html @@ -1,66 +1,52 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Button</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> -</head> -<body> - -<div class="container"> - - <h1>Button <small>Bootstrap Visual Test</small></h1> - - <button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button> - - <p>For checkboxes and radio buttons, ensure that keyboard behavior is functioning correctly.</p> - <p>Navigate to the checkboxes with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>), and ensure that <kbd>SPACE</kbd> toggles the currently focused checkbox. Click on one of the checkboxes using the mouse, ensure that focus was correctly set on the actual checkbox, and that <kbd>SPACE</kbd> toggles the checkbox again.</p> - - <div class="btn-group" data-toggle="buttons"> - <label class="btn btn-primary"> - <input type="checkbox"> checkbox 1 - </label> - <label class="btn btn-primary"> - <input type="checkbox"> checkbox 2 - </label> - <label class="btn btn-primary"> - <input type="checkbox"> checkbox 3 - </label> - </div> - - <p>Navigate to the radio button group with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>). If no radio button was initially set to be selected, the first/last radio button should receive focus (depending on whether you navigated "forward" to the group with <kbd>TAB</kbd> or "backwards" using <kbd>SHIFT + TAB</kbd>). If a radio button was already selected, navigating with the keyboard should set focus to that particular radio button. Only one radio button in a group should receive focus at any given time. Ensure that the selected radio button can be changed by using the <kbd>←</kbd> and <kbd>→</kbd> arrow keys. Click on one of the radio buttons with the mouse, ensure that focus was correctly set on the actual radio button, and that <kbd>←</kbd> and <kbd>→</kbd> change the selected radio button again.</p> - - <div class="btn-group" data-toggle="buttons"> - <label class="btn btn-primary"> - <input type="radio" name="options" id="option1"> Radio 1 - </label> - <label class="btn btn-primary"> - <input type="radio" name="options" id="option2"> Radio 2 - </label> - <label class="btn btn-primary"> - <input type="radio" name="options" id="option3"> Radio 3 - </label> - </div> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/button.js"></script> - -<!-- JavaScript Test --> -<script> -$(function () { - $('.js-loading-button').on('click', function () { - var btn = $(this).button('loading') - setTimeout(function (){ - btn.button('reset') - }, 3000) - }) -}) -</script> -</body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Button</title> + </head> + <body> + <div class="container"> + <h1>Button <small>Bootstrap Visual Test</small></h1> + + <button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"> + Single toggle + </button> + + <p>For checkboxes and radio buttons, ensure that keyboard behavior is functioning correctly.</p> + <p>Navigate to the checkboxes with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>), and ensure that <kbd>SPACE</kbd> toggles the currently focused checkbox. Click on one of the checkboxes using the mouse, ensure that focus was correctly set on the actual checkbox, and that <kbd>SPACE</kbd> toggles the checkbox again.</p> + + <div class="btn-group" data-toggle="buttons"> + <label class="btn btn-primary active"> + <input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked) + </label> + <label class="btn btn-primary"> + <input type="checkbox" autocomplete="off"> Checkbox 2 + </label> + <label class="btn btn-primary"> + <input type="checkbox" autocomplete="off"> Checkbox 3 + </label> + </div> + + <p>Navigate to the radio button group with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>). If no radio button was initially set to be selected, the first/last radio button should receive focus (depending on whether you navigated "forward" to the group with <kbd>TAB</kbd> or "backwards" using <kbd>SHIFT + TAB</kbd>). If a radio button was already selected, navigating with the keyboard should set focus to that particular radio button. Only one radio button in a group should receive focus at any given time. Ensure that the selected radio button can be changed by using the <kbd>←</kbd> and <kbd>→</kbd> arrow keys. Click on one of the radio buttons with the mouse, ensure that focus was correctly set on the actual radio button, and that <kbd>←</kbd> and <kbd>→</kbd> change the selected radio button again.</p> + + <div class="btn-group" data-toggle="buttons"> + <label class="btn btn-primary active"> + <input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected) + </label> + <label class="btn btn-primary"> + <input type="radio" name="options" id="option2" autocomplete="off"> Radio 2 + </label> + <label class="btn btn-primary"> + <input type="radio" name="options" id="option3" autocomplete="off"> Radio 3 + </label> + </div> + </div> + + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/button.js"></script> + </body> </html> |
