タイトルで出オチ。
visibility:hiddenしたフォームコントロールはタブフォーカスできない(タブオーダーから外れる)ことに気が付きました。
display:noneしたフォームコントロールがタブフォーカスできないのは知っていたし理解できるけど、visibilityは
- 「見えてるか見えてないか」の表示性を表すプロパティであり、
displayのように存在までなくしてしまうわけではない
| // Node.js | |
| var fs = require('fs'); | |
| function func() { | |
| try { | |
| fs.statSync('./foo/'); | |
| // operate files in the directory foo |
| // Depending on jQuery and UAParser.js | |
| function disablePhoneLink() { | |
| var device_type = new UAParser().getDevice().type; | |
| var is_not_mobile = !(device_type == 'mobile' || device_type == 'tablet'); | |
| if (is_not_mobile) { | |
| $('a[href^="tel:"]').each(function() { | |
| $(this).addClass('is-disabled') | |
| .on('click', function(event) { event.preventDefault(); }); |
| @mixin pseudo-elem-icon($width, $height, $image) { | |
| content: ""; | |
| width: $width; | |
| height: $height; | |
| display: inline-block; | |
| background: url($image) no-repeat 0 0; | |
| background-size: contain; | |
| } | |
| // Usage |
| var original_array = ['D-1', 'D-2', 'D-3']; | |
| var copied_array = original_array.concat(); | |
| original_array.push('Dragoon'); | |
| // original_array --> ['D-1', 'D-2', 'D-3', 'Dragoon'] | |
| // copied_array --> ['D-1', 'D-2', 'D-3'] |
| var checkbox = document.querySelector('input[type="checkbox"]'); | |
| checkbox.addEventListener('click', function(event) { | |
| event.target.checked = false; | |
| }); |
| if (typeof foo !== 'undefined') { | |
| // ... | |
| } |
| var isIE = !(window.ActiveXObject) && "ActiveXObject" in window; |