Repository navigation
Commit 62d2bcd
fix(ui): give the filter funnel a 24x24 touch target (#407)
Measured on an iPhone 13 profile, the column-header filter funnel drew an
18x18 CSS px tap target. WCAG 2.5.8 (Target Size, Minimum) asks for 24x24,
so every filterable column header on every consumer's mobile app was under
the floor.
The glyph is unchanged. The extra 6px is a transparent `::after` on the
button: out of flow, so it cannot grow the header box that `readDensity`
and the surface's virtualisation geometry measure in JS, and it leaves the
hover chip and focus ring drawn on the same 18px box they were before.
Padding plus a negative margin would have grown the button's border box and
taken both of those with it.
The pseudo-element is anchored `right: 0` rather than centred. The 4px
resize strip sits flush against the funnel's right edge, and while the strip
protects itself either way (it carries `z-index: 2` inside the overlay
anchor's stacking context, and a centred box measurably takes none of it), a
centred box puts 3 of the funnel's own 24px underneath the strip where
nothing can tap them — 21px reachable, still short. Growing leftward spends
all 6px on the header cell, a sort target hundreds of px wide.
Verified by hit-test sweep (`document.elementFromPoint` over every pixel
around the control) on an iPhone 13 profile in Chromium and WebKit:
density funnel target glyph box resize strip header/row
compact 18x18 -> 24x24 18x18 unchanged 44 / 40
standard 18x18 -> 24x24 18x18 unchanged 52 / 48
spacious 18x18 -> 24x24 18x18 unchanged 60 / 56
Header and row heights are byte-identical with the rule applied and with it
mutated away, at all three densities, and the header cell loses exactly
6 x 24 = 144 hit-testable px to the funnel while the resize strip loses none.
A 24px header (Excel's compact tier, the tightest shipped) still contains the
target without it reaching the first data row.
Known gap, left alone deliberately: with the drag-to-group panel enabled the
surface also renders an 18px column-menu button immediately left of the
funnel, which paints above the funnel's hit area. The funnel is then 24 tall
but ~17 wide. Three controls cannot each have 24px in the 40px the overlay
anchor allots; closing that needs the slot offsets in pretable-surface.tsx to
move, not another CSS rule.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent f7ec6e7 commit 62d2bcd
2 files changed
Lines changed: 139 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
742 | 838 | | |
743 | 839 | | |
744 | 840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
763 | 806 | | |
764 | 807 | | |
765 | 808 | | |
| |||
0 commit comments