Commit graph

1758 commits

Author SHA1 Message Date
XhmikosR
897f4db11a
Update tab.js 2020-11-25 15:02:12 +02:00
Mark Otto
a13fba81f2 dist v5 2019-07-13 22:20:44 +01:00
patrickhlauke
a38a3bd904 Fix visual unit test
fix the borked examples of dynamic tab panels, and remove the now unsupported tabs with dropdowns
2019-07-13 22:20:42 +01:00
patrickhlauke
430a1204aa Add extensive keyboard handling unit tests
very verbose, but fully tests that cursor keys are handled correctly and have the desired final result (though stops short of checking the actual tab panels themselves)
2019-07-13 22:02:04 +01:00
patrickhlauke
fabe1f0e24 Remove redundant sanity checks
unnecessary, as these checks should never fail (since the handler would not be called if there weren't any tabs, and the `index > 0` clause in the preceding `if` ensures that `index` will never be negative
2019-07-13 21:52:21 +01:00
patrickhlauke
1687b77a48 Fix one of the existing unit tests
the markup fragment does not reflect proper code structure (surprising that it still worked...)
2019-07-13 16:52:28 +01:00
patrickhlauke
eb299c90e5 Unit test for tablist initialization
- check that `tabindex` and `aria-selected` are properly set up with only one `aria-selected="true"` and `tabindex="0"`
- check that as fallback the first tab control is set to `aria-selected="true"`
2019-07-13 16:48:26 +01:00
patrickhlauke
65b32a0107 Merge branch 'patrickhlauke-tabs-kbd-automatic-activation' of https://github.com/twbs/bootstrap into patrickhlauke-tabs-kbd-automatic-activation 2019-07-13 10:56:38 +01:00
Johann-S
ea0e99dfc5 add transitioning state to avoid displaying two tabs in the same time 2019-07-08 14:45:04 +02:00
patrickhlauke
3c8170044a Tweak
Stick with the naive `tabs[index].click()` as it works correctly, and trying to trigger just `show()` of a tab instance resulted in weird side effects...

Tighten the outer `makeArrary`/`forEach` loop (assuming when there's an empty array the forEach just bails, so no need to check the length?)
2019-07-08 14:20:19 +02:00
patrickhlauke
7c79b8a80f Replace for loop with forEach 2019-07-08 14:20:19 +02:00
patrickhlauke
35179a4aee Remove dropdown-in-tabs related unit tests
Since that logic has now been expunged
2019-07-08 14:20:19 +02:00
patrickhlauke
a8cf124b82 Initial code tweaks based on comments 2019-07-08 14:20:19 +02:00
patrickhlauke
a1e7738632 Remove dropdown-in-tabs related code
- there's no ARIA pattern that would allow dropdowns in tablists; it cannot be expressed accessibly to AT users. it also has serious usability drawbacks. we're already saying in the docs it should not be
used ... this goes a step further and removes the handling for it
2019-07-08 14:20:19 +02:00
patrickhlauke
da9f93da1c WIP add initial keyboard handling and initialisation
- initialisation happens very inelegantly - could do with some advice on how to move this to a function (should it be public, private, static?)
- keyboard handling works, but seems to get confused when switching too quickly between tabs sometimes
- activating tabs currently done via click() - there must be a nicer way to do this...how? fire _activate? which parameters to pass?
2019-07-08 14:20:19 +02:00
patrickhlauke
2e5a010901 Add initial tabindex handling for tabs
set `tabindex` as well as `aria-selected` on tabs
2019-07-08 14:20:18 +02:00
Patrick H. Lauke
8be4c1364f
Merge branch 'master' into patrickhlauke-tabs-kbd-automatic-activation 2019-06-25 15:21:49 +01:00
Patrick H. Lauke
f2c63ac729 Port new unit test for dropdown from v4 (#28913)
Add unit test from #28912 to v5
2019-06-25 14:57:41 +03:00
Patrick H. Lauke
d91293d966
Merge branch 'master' into patrickhlauke-tabs-kbd-automatic-activation 2019-06-19 12:58:23 +01:00
patrickhlauke
95ebcedccd Tweak
Stick with the naive `tabs[index].click()` as it works correctly, and trying to trigger just `show()` of a tab instance resulted in weird side effects...

Tighten the outer `makeArrary`/`forEach` loop (assuming when there's an empty array the forEach just bails, so no need to check the length?)
2019-06-19 12:47:13 +01:00
patrickhlauke
cbac96d5b0 Replace for loop with forEach 2019-06-19 11:01:25 +01:00
patrickhlauke
d722edcb29 Remove dropdown-in-tabs related unit tests
Since that logic has now been expunged
2019-06-19 10:48:56 +01:00
Patrick H. Lauke
f0f75379f6 Closing dropdown with ESC correctly sets focus to toggle (#28928)
Just firing the focus event isn't enough ... need to actually call the proper `focus()` method for it to actually do it...
2019-06-19 12:23:41 +03:00
patrickhlauke
53e954c834 Initial code tweaks based on comments 2019-06-19 10:22:34 +01:00
patrickhlauke
33df950b27 Remove dropdown-in-tabs related code
- there's no ARIA pattern that would allow dropdowns in tablists; it cannot be expressed accessibly to AT users. it also has serious usability drawbacks. we're already saying in the docs it should not be
used ... this goes a step further and removes the handling for it
2019-06-18 20:19:53 +01:00
patrickhlauke
7c90656c13 WIP add initial keyboard handling and initialisation
- initialisation happens very inelegantly - could do with some advice on how to move this to a function (should it be public, private, static?)
- keyboard handling works, but seems to get confused when switching too quickly between tabs sometimes
- activating tabs currently done via click() - there must be a nicer way to do this...how? fire _activate? which parameters to pass?
2019-06-18 19:59:05 +01:00
patrickhlauke
f4d85517b9 Add initial tabindex handling for tabs
set `tabindex` as well as `aria-selected` on tabs
2019-06-17 23:45:07 +01:00
david-lallement
0829decce0 tooltip dispose:removing only own event handler (#28896) 2019-06-13 10:42:54 +02:00
XhmikosR
8a79cf894d event-handler.js: use a plain for loop. (#28853) 2019-06-03 13:08:17 +02:00
Johann-S
d5752a18ab toast should allow prevent default for hide and show events 2019-05-16 13:24:29 +02:00
Johann-S
c805aec770 fix popover arrow by selecting the first element child 2019-05-14 15:28:43 +02:00
Martijn Cuppens
a827934f13 Documentation tweaks (#28679)
* Documentation tweaks

* Remove redundant col-12 classes
2019-05-08 19:58:29 +03:00
XhmikosR
438e01b61c Rename eventHandler and selectorEngine files. 2019-05-08 17:26:37 +03:00
Johann-S
dda31bbee6 improve build plugin script to keep file name 2019-05-08 17:26:37 +03:00
XhmikosR
e7657c8bc0 Remove the unicorn/filename-case rule suppression. 2019-05-08 17:26:37 +03:00
XhmikosR
091aa1e9fd
v5 dist (#28657) 2019-04-18 14:47:52 +03:00
Johann-S
14f53d9baa fix unit tests for chrome mobile 2019-04-15 13:48:27 +02:00
XhmikosR
afc63ec887 Fix xo error: use for...of. 2019-04-10 15:18:57 +03:00
XhmikosR
105687ac4a Update eslint config for the new xo rules. 2019-04-10 15:18:57 +03:00
ysds
f4877dbf03 Remove _close() and marge with _hide() 2019-04-09 13:59:41 +02:00
ysds
91ebb4b3b2 Call hide() after delay time 2019-04-09 13:59:41 +02:00
XhmikosR
efb9a7749f
karma.conf.js: switch to CI === true. (#28588) 2019-04-01 17:26:43 +03:00
Johann-S
1752addadf Reset carousel touch delta x to prevent click transformation in swipe (#28558) 2019-03-27 14:37:04 +02:00
Johann-S
ad0f5f153c fix remove files in our visual tests 2019-03-18 01:11:05 +02:00
Johann-S
08679ac0b5 Add back support for IE 11 2019-03-18 01:11:05 +02:00
XhmikosR
6aa475c82e
Use one-line imports when possible. (#28467) 2019-03-13 14:55:53 +02:00
XhmikosR
ac67e04ce0 Dist. 2019-03-11 17:59:08 +02:00
Johann-S
2fd50f98a5 build bootstrap in esm 2019-03-11 17:59:08 +02:00
XhmikosR
3ffe3a5d82 collapse.js: minor refactoring. 2019-03-11 17:01:28 +02:00
XhmikosR
1393678f0b Remove obsolete comments. 2019-03-11 17:01:28 +02:00