aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-16Make "Copy" buttons actual buttonsPatrick H. Lauke2-2/+10
This makes them keyboard-accessible. For mouse users, the only change here is that the focus outline will remain on the button once clicked (in future, this can be solved with :focus-ring, but for now this would require a polyfill). the tooltip is explicitly hidden on `mouseleave`, so even though the `<button>` retains focus after clicking, the tooltip won't stay visible once mouse user moves away. the mouse hover styles have explicitly not been make to also apply to :focus, so as to minimise the visual impact for mouse users (though the tooltip remains visible) - but due to the default outline and the custom tooltip, it should be fairly clear when keyboard users set focus to a copy button too.
2017-04-16gruntMark Otto28-173/+100
2017-04-14Replace dropdown backdrop hack with cleaner JS-only hackPatrick H. Lauke4-26/+12
* Replace backdrop with simple noop mouse listener As discussed in https://github.com/twbs/bootstrap/pull/22422 the current approach of injecting a backdrop (to work around iOS' broken event delegation for the `click` event) has annoying consequences on touch-enabled laptop/desktop devices. Instead of a backdrop `<div>`, here we simply add extra empty/noop mouse listeners to the immediate children of `<body>` (and remove them when the dropdown is closed) in order to force iOS to properly bubble a `click` resulting from a tap (essentially, method 2 from https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html) This is sufficient (except in rare cases where the user does manage to tap on the body itself, rather than any child elements of body - which is not very likely in an iOS phone/tablet scenario for most layouts) to get iOS to get a grip and do the correct event bubbling/delegation, meaning the regular "click" event will bubble back to the `<body>` when tapping outside of the dropdown, and the dropdown will close properly (just like it already does, even without this fix, in non-iOS touchscreen devices/browsers, like Chrome/Android and Windows on a touch laptop). This approach, though a bit hacky, has no impact on the DOM structure, and has no unforeseen side effects on touch-enabled laptops/desktops. And crucially, it works just fine in iOS. * Remove dropdown backdrop styles * Update doc for dropdowns and touch-enabled devices
2017-04-14remove dropdown.js reliance on roles and fix keyboard navigationPatrick H. Lauke2-218/+333
2017-04-13Merge branch 'v4-dev' into dropdown-keyboardPatrick H. Lauke1-1/+1
2017-04-13Fix popover arrow color for bottom positionIdan Cohen1-1/+1
2017-04-12Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager2-6/+7
2017-04-12Reword "mobile" to "touch-enabled"Patrick H. Lauke2-6/+7
...as touch is not exclusive to "mobile" anymore nowadays. also explicitly clarifies this is a fix for iOS, and that it impacts touch laptops etc as well. lastly, renames the variable from "dropdown" to "backdrop" for clarity/consistency
2017-04-12Reword "mobile" to "touch-enabled"Patrick H. Lauke2-6/+7
...as touch is not exclusive to "mobile" anymore nowadays. also explicitly clarifies this is a fix for iOS, and that it impacts touch laptops etc as well. lastly, renames the variable from "dropdown" to "backdrop" for clarity/consistency
2017-04-12Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager14-32/+8
2017-04-12IndentPierre-Denis Vanduynslager1-1/+1
2017-04-11Remove inappropriate role="listbox" from carouselsPatrick H. Lauke3-6/+6
Closes #22061 Xref #22365
2017-04-11Remove inappropriate role="listbox" from carouselsPatrick H. Lauke3-6/+6
2017-04-10Package grunt (#22396)Mark Otto2-2/+1
Remove docs files and Gruntfile from package managers
2017-04-10Remove `cursor: not-allowed` stylesPatrick H. Lauke9-24/+1
Per discussion on https://github.com/twbs/bootstrap/issues/22222#issuecomment-292819959 > browsers don't normally use the "not-allowed" cursor in these circumstances, so it makes BS a bit opinionated here. (and, at least on Windows, the "not-allowed" cursor looks rather fugly with its red colour compared to other regular mouse pointers) > > ![capture](https://cloud.githubusercontent.com/assets/895831/24841663/1f9bbd46-1d81-11e7-9e96-54502b731edf.PNG) Closes https://github.com/twbs/bootstrap/issues/22222
2017-04-10Remove `cursor: not-allowed` stylesPatrick H. Lauke9-24/+1
2017-04-10Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager5-23/+41
2017-04-10Fix collapse.js aria-expanded behaviorPatrick H. Lauke3-21/+17
* Remove aria-expanded from collapse.js target element aria-expanded="true"/aria-expanded="false" only applies to the trigger, not the element that is being expanded/collapsed. * Tweak collapse.js accessibility section ...to make it clearer that the aria-expanded attribute always just goes on the control. * Fix collapse.js unit tests - reword some of the text to make it clear we're checking behavior of trigger/control - move incorrect aria-expanded out of the <div>s and to the actual trigger/control <a>s - fix incorrect test assertion text output false -> true
2017-04-10Only change aria-pressed if it's not an input-based radio or checkbox groupPatrick H. Lauke2-2/+24
* Only change aria-pressed if it's not an input-based radio or checkbox group aria-pressed="true"/aria-pressed="false" is really only useful for making on/off toggles out of, say, `<button>` elements. the attribute is useless (and potentially confusing/conflicting) on, say, `<label>` elements for an existing `<input type="radio">` or similar. * Add unit test for buttons.js and radio/checkbox inputs in button groups
2017-04-09Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager31-266/+247
2017-04-09Remove incorrect role="tabpanel" from navs docsPatrick H. Lauke1-6/+4
`role="tabpanel"` is not appropriate as role for the overall container - it only applies to the individual content parts of each tab
2017-04-09Merge branch 'v4-dev' into v4-dev-docs-navs-js-tabpanel-fixPatrick H. Lauke12-30/+30
2017-04-09Add explicit aria-label to placeholder-only inputsPatrick H. Lauke12-30/+30
While `placeholder` is nominally valid per spec http://rawgit.com/w3c/html-api-map/master/index.html#accessible-name-and-description-calculation it is inelegant, a fallback, and not supported in ios/safari/voiceover and android/chrome/talkback, to name a few combinations `aria-describedby` is also not really the right tool for providing a name/label equivalent, so remove that from the list of possible alternative methods / clarify how it can be used
2017-04-09Merge branch 'v4-dev' into v4-dev-docs-navs-js-tabpanel-fixPatrick H. Lauke1-0/+1
2017-04-09Merge branch 'v4-dev' into v4-docs-button-group-a11y-patch1Patrick H. Lauke1-0/+1
2017-04-09Merge pull request #22398 from ↵Patrick H. Lauke1-0/+1
patrickhlauke/v4-dev-modal-macos-fullscreen-esc-fix Prevent default for ESC in modal.js
2017-04-09Remove incorrect role="tabpanel" from navs docsPatrick H. Lauke1-6/+4
`role="tabpanel"` is not appropriate as role for the overall container - it only applies to the individual content parts of each tab
2017-04-09Prevent default for ESC in modal.jsPatrick H. Lauke1-0/+1
ESC can be used to close modals, but on OS X/macOS this also jumps out of full-screen mode. `preventDefault` suppresses this.
2017-04-09Merge branch 'v4-dev' into v4-docs-button-group-a11y-patch1Patrick H. Lauke75-2023/+1931
2017-04-08gruntMark Otto8-168/+166
2017-04-08fixes #21922: set border-radius to 0 when global radius is disabledMark Otto1-1/+5
2017-04-08fixes #22135Mark Otto1-3/+6
2017-04-08Update card outline mixinMark Otto1-0/+6
Fixes #22056 by ensuring outline cards make their header/footer transparent and use the right border color.
2017-04-08tighten up horizontal input and button paddingMark Otto1-1/+1
2017-04-08Bump up from 2px to 3px so it's consistent; also fix focus of inputsMark Otto2-5/+5
2017-04-08Rename some .open to .show (#22389)Mark Otto2-12/+6
* no more outline overrides * rename old .open to .show
2017-04-08property orderMark Otto1-1/+1
2017-04-08Switch to ease function to remove trailing animation movementMark Otto1-1/+1
2017-04-08Do not stretch images in carousel-itemPierre-Denis Vanduynslager1-0/+1
2017-04-08drop img-fluid for w-100Mark Otto1-12/+12
2017-04-08Ensure carousel works in IE10/11Mark Otto3-34/+14
- Drops the `if-supports-3d-transforms()` mixin since all our browsers do support it - Updates carousel to not rely on that mixin
2017-04-08Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager185-4503/+13514
2017-04-08Revert "Drop width from sizing utils given .col- classes can do the same ↵Mark Otto3-5/+12
thing (follow up to #22376)" This reverts commit 2f21403a933336f7cb01c86bf3c650490bc658a6.
2017-04-08Add transition to .progress-barMark Otto2-0/+2
- Pulls in values from v3 - Closes #22371 which didn't use a transition include
2017-04-08Add dropdown-item-padding-y varMark Otto2-1/+2
- Closes #21622 which kept the 3px - Puts variable in proper order for shorthand (y x)
2017-04-08Drop width from sizing utils given .col- classes can do the same thing ↵Mark Otto3-12/+5
(follow up to #22376)
2017-04-08Remove margin-left on caret if empty (#22095)Jesper Strange Klitgaard Christiansen1-0/+4
2017-04-08Drop .jumbotron-hrMark Otto1-4/+0
- Closes #21760 - No longer needed since we have an rgba() value for this element, so it naturally darkens
2017-04-08Docs and CSS updates for #21807 (#22336)Mark Otto4-50/+26
* tweak some copy * fix up scrollspy docs * remove nav styles that were added * fix nav-based docs by requiring .nav-item on .nav-link
2017-04-08gruntMark Otto36-1497/+588