| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -682,6 +682,10 @@ | |||
| 682 | 682 | opacity: 0.85; | |
| 683 | 683 | } | |
| 684 | 684 | ||
| 685 | + .toggle-switch:focus-visible { | ||
| 686 | + border-radius: 4px; | ||
| 687 | + } | ||
| 688 | + | ||
| 685 | 689 | .toggle-switch .toggle-label { | |
| 686 | 690 | font-size: 11px; | |
| 687 | 691 | font-weight: 500; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -733,14 +733,18 @@ function toggleAllBytecode() { | |||
| 733 | 733 | } | |
| 734 | 734 | } | |
| 735 | 735 | ||
| 736 | - // Keyboard shortcut: 'b' toggles all bytecode panels | ||
| 736 | + // Keyboard shortcut: 'b' toggles all bytecode panels, Enter/Space activates toggle switches | ||
| 737 | 737 | document.addEventListener('keydown', function(e) { | |
| 738 | 738 | if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') { | |
| 739 | 739 | return; | |
| 740 | 740 | } | |
| 741 | 741 | if (e.key === 'b' && !e.ctrlKey && !e.altKey && !e.metaKey) { | |
| 742 | 742 | toggleAllBytecode(); | |
| 743 | 743 | } | |
| 744 | + if ((e.key === 'Enter' || e.key === ' ') && e.target.classList.contains('toggle-switch')) { | ||
| 745 | + e.preventDefault(); | ||
| 746 | + e.target.click(); | ||
| 747 | + } | ||
| 744 | 748 | }); | |
| 745 | 749 | ||
| 746 | 750 | // Handle hash changes | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,17 +70,17 @@ | |||
| 70 | 70 | </div> | |
| 71 | 71 | <div class="legend-separator" aria-hidden="true"></div> | |
| 72 | 72 | <div class="legend-controls"> | |
| 73 | - <div class="toggle-switch" id="toggle-color-mode" title="Toggle between self time and total time coloring"> | ||
| 73 | + <div class="toggle-switch" id="toggle-color-mode" title="Toggle between self time and total time coloring" tabindex="0"> | ||
| 74 | 74 | <span class="toggle-label active" data-text="Self Time">Self Time</span> | |
| 75 | 75 | <div class="toggle-track"></div> | |
| 76 | 76 | <span class="toggle-label" data-text="Total Time">Total Time</span> | |
| 77 | 77 | </div> | |
| 78 | - <div class="toggle-switch" id="toggle-cold" title="Toggle visibility of lines with zero samples"> | ||
| 78 | + <div class="toggle-switch" id="toggle-cold" title="Toggle visibility of lines with zero samples" tabindex="0"> | ||
| 79 | 79 | <span class="toggle-label active" data-text="Show All">Show All</span> | |
| 80 | 80 | <div class="toggle-track"></div> | |
| 81 | 81 | <span class="toggle-label" data-text="Hot Only">Hot Only</span> | |
| 82 | 82 | </div> | |
| 83 | - <div class="toggle-switch" id="toggle-spec-view" title="Color lines by specialization level (requires bytecode data)"> | ||
| 83 | + <div class="toggle-switch" id="toggle-spec-view" title="Color lines by specialization level (requires bytecode data)" tabindex="0"> | ||
| 84 | 84 | <span class="toggle-label active" data-text="Heat">Heat</span> | |
| 85 | 85 | <div class="toggle-track"></div> | |
| 86 | 86 | <span class="toggle-label" data-text="Specialization">Specialization</span> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -387,6 +387,7 @@ body { | |||
| 387 | 387 | button:focus-visible, | |
| 388 | 388 | select:focus-visible, | |
| 389 | 389 | input:focus-visible, | |
| 390 | + .toggle-switch:focus-visible, | ||
| 390 | 391 | a.toolbar-btn:focus-visible { | |
| 391 | 392 | outline: 2px solid var(--python-gold); | |
| 392 | 393 | outline-offset: 2px; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments