Repository navigation
perf(Tooltip): the layer mounts at the tooltip's first show - #11916
Conversation
Every Tooltip mounted its layer with its trigger, so a table with a tooltip on every row mounted hundreds of closed layers and froze for seconds. The layer now mounts at the first hover, focus, tap or show(), in the same commit as that show, and then stays. Until then the trigger's aria-describedby names hidden text with the same content, so screen readers read the same description; the hidden text and the layer are never in the page together. Tests that read the closed layer before any interaction now read the tooltip after it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Tokenizer · Storybook | 116.3 kB (+1.2 kB) · 22.0 kB CSS (+27 B) | 2,680 (0) | — · ✗ · — |
| PowerSearch · Storybook | 323.6 kB (+1.2 kB) · 27.4 kB CSS (+28 B) | 7,198 (0) | — · ✗ · — |
| InputGroup | 65.4 kB (+925 B) · 9.2 kB CSS (+331 B) | — | — · ✗ · — |
198 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| FileInput · Storybook | 79.7 kB (+1.2 kB) · 12.9 kB CSS (+33 B) | 794 (0) | — · ✗ · — |
| Tooltip · Storybook | 34.3 kB (+889 B) · 5.1 kB CSS (+337 B) | 1,097 (+113) | — · ✗ · — |
| Text · Storybook | 12.0 kB (+124 B) · 6.1 kB CSS (+339 B) | 1,043 (+4) | — · ✗ · — |
| Timestamp · Storybook | 28.4 kB (+129 B) · 11.5 kB CSS (+22 B) | 989 (0) | — · ✗ · — |
| Switch · Storybook | 113.6 kB (+1.0 kB) · 10.8 kB CSS (+313 B) | 1,815 (0) | — · ✓ · — |
| TextArea · Storybook | 97.0 kB (+1.0 kB) · 10.3 kB CSS (+313 B) | 509 (0) | — · ✓ · — |
| Selector | 124.5 kB (+1.3 kB) · 19.8 kB CSS (+29 B) | — | — · ✓ · — |
| Drawer | 60.0 kB (+974 B) · 9.1 kB CSS (+331 B) | — | — · — · — |
| Slider · Storybook | 118.9 kB (+985 B) · 9.6 kB CSS (+319 B) | 2,501 (+4) | — · ✓ · — |
| RadioListItem | 81.0 kB (+988 B) · 11.5 kB CSS (+315 B) | — | — · — · — |
| SegmentedControl | 105.2 kB (+972 B) · 7.6 kB CSS (+328 B) | — | — · ✓ · — |
| lab/AudioPlayer | 242.2 kB (+1.3 kB) · 1.8 kB CSS (0) | — | — · — · — |
| TimeInput · Storybook | 184.2 kB (+1.2 kB) · 17.9 kB CSS (+34 B) | 1,890 (0) | — · ✓ · — |
| Link | 59.6 kB (+938 B) · 7.8 kB CSS (+348 B) | — | — · ✓ · — |
| Typeahead | 98.1 kB (+1.2 kB) · 14.5 kB CSS (+27 B) | — | — · ✓ · — |
| NumberInput · Storybook | 108.5 kB (+1.2 kB) · 13.1 kB CSS (+24 B) | 1,482 (0) | — · ✓ · — |
| Lightbox | 153.5 kB (+1.2 kB) · 12.4 kB CSS (+32 B) | — | — · — · — |
| Pagination · Storybook | 157.3 kB (+1.2 kB) · 20.2 kB CSS (+27 B) | 741 (0) | — · ✓ · — |
| lab/TransferListSelector | 154.4 kB (+1.2 kB) · 1.4 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 131.5 kB (+1.2 kB) · 773 B CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlaybackRate | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 232.4 kB (+1.2 kB) · 1.5 kB CSS (0) | — | — · — · — |
| lab/VideoPlayer | 239.7 kB (+1.2 kB) · 2.1 kB CSS (0) | — | — · — · — |
| DateRangeInput · Storybook | 109.1 kB (+1.2 kB) · 14.3 kB CSS (+39 B) | 704 (0) | — · ✓ · — |
| Field | 63.2 kB (+930 B) · 8.0 kB CSS (+313 B) | — | — · ✓ · — |
| SideNavItem | 85.2 kB (+1.2 kB) · 12.5 kB CSS (+24 B) | — | — · — · — |
| lab/Comments | 393.9 kB (+1.2 kB) · 2.5 kB CSS (0) | — | — · — · — |
| RadioList | 64.7 kB (+925 B) · 8.0 kB CSS (+312 B) | — | — · ✓ · — |
| TextInput · Storybook | 103.5 kB (+1.2 kB) · 12.9 kB CSS (+34 B) | 416 (0) | — · ✓ · — |
| lab/CommentThread | 387.0 kB (+1.2 kB) · 2.4 kB CSS (0) | — | — · — · — |
| FieldLabel | 58.7 kB (+893 B) · 6.5 kB CSS (+342 B) | — | — · ✓ · — |
| DateInput · Storybook | 212.0 kB (+1.2 kB) · 19.0 kB CSS (+31 B) | 6,364 (+1) | — · ✓ · — |
| DateTimeInput · Storybook | 236.3 kB (+1.2 kB) · 20.7 kB CSS (+28 B) | 3,719 (0) | — · ✓ · — |
| CheckboxList | 77.3 kB (+926 B) · 8.5 kB CSS (+301 B) | — | — · ✓ · — |
| InfoTip · Storybook | 53.3 kB (+879 B) · 6.0 kB CSS (+345 B) | 151 (+1) | — · ✓ · — |
| lab/EmojiPicker | 123.2 kB (+1.2 kB) · 751 B CSS (0) | — | — · — · — |
| Carousel | 80.1 kB (+1.2 kB) · 12.2 kB CSS (+29 B) | — | — · — · — |
| lab/TransferList | 142.2 kB (+1.2 kB) · 1.2 kB CSS (0) | — | — · — · — |
| MultiSelector · Storybook | 112.1 kB (+1.2 kB) · 19.0 kB CSS (+26 B) | 2,789 (0) | — · ✓ · — |
| ChatComposerInput | 90.5 kB (+1.1 kB) · 12.6 kB CSS (+31 B) | — | — · — · — |
| ChatComposerTokenElement | 90.5 kB (+1.1 kB) · 12.6 kB CSS (+31 B) | — | — · — · — |
| lab/ListInput · Storybook | 99.4 kB (+1.2 kB) · 922 B CSS (0) | 1,083 (0) | — · ✓ · — |
| lab/ChatReactionBar | 132.7 kB (+1.2 kB) · 1.1 kB CSS (0) | — | — · — · — |
| AvatarGroup | 51.1 kB (+877 B) · 6.4 kB CSS (+323 B) | — | — · — · — |
| TopNavHeading | 90.7 kB (+1.1 kB) · 12.6 kB CSS (+27 B) | — | — · — · — |
| Markdown | 213.7 kB (+1.1 kB) · 23.6 kB CSS (+31 B) | — | — · — · — |
| Thumbnail | 74.1 kB (+1.1 kB) · 12.8 kB CSS (+27 B) | — | — · — · — |
| ContextMenu | 109.7 kB (+1.1 kB) · 19.7 kB CSS (+32 B) | — | — · — · — |
| DropdownMenu | 136.2 kB (+1.1 kB) · 19.9 kB CSS (+30 B) | — | — · — · — |
| StatusDot | 36.1 kB (+876 B) · 6.0 kB CSS (+313 B) | — | — · — · — |
| Table | 129.1 kB (+1.1 kB) · 21.3 kB CSS (+21 B) | — | — · — · — |
| AvatarGroupOverflow | 54.3 kB (+866 B) · 6.3 kB CSS (+322 B) | — | — · — · — |
| ChatComposer | 93.4 kB (+1.1 kB) · 13.6 kB CSS (+31 B) | — | — · — · — |
| SideNavHeading | 91.0 kB (+1.1 kB) · 12.6 kB CSS (+24 B) | — | — · — · — |
| ComplexSelector · Storybook | 86.4 kB (+1.1 kB) · 13.3 kB CSS (+25 B) | 750 (0) | — · ✓ · — |
| richtext/RichTextEditorToolbar | 319.6 kB (+1.2 kB) · 454 B CSS (0) | — | — · — · — |
| charts/Chart | 254.3 kB (+1.2 kB) · 516 B CSS (0) | — | — · — · — |
| MoreMenu | 136.5 kB (+1.1 kB) · 19.9 kB CSS (+30 B) | — | — · — · — |
| BreadcrumbItem | 105.9 kB (+1.1 kB) · 14.1 kB CSS (+26 B) | — | — · — · — |
| lab/CommentComposer | 190.1 kB (+1.2 kB) · 1.9 kB CSS (0) | — | — · — · — |
| Avatar | 48.2 kB (+858 B) · 6.3 kB CSS (+320 B) | — | — · ✓ · — |
| AlertDialog | 136.4 kB (+1.1 kB) · 16.3 kB CSS (+28 B) | — | — · — · — |
| BaseTypeahead | 86.5 kB (+1.1 kB) · 12.2 kB CSS (+27 B) | — | — · ✓ · — |
| lab/TourStep | 99.1 kB (+1.1 kB) · 691 B CSS (0) | — | — · — · — |
| Toast | 109.6 kB (+1.1 kB) · 11.5 kB CSS (+22 B) | — | — · — · — |
| ToggleButton | 97.1 kB (+1.1 kB) · 11.3 kB CSS (+24 B) | — | — · — · — |
| TopNavMenu | 90.1 kB (+1.1 kB) · 12.6 kB CSS (+29 B) | — | — · — · — |
| richtext/RichTextView | 289.8 kB (+1.1 kB) · 2.4 kB CSS (0) | — | — · — · — |
| charts/ChartTooltip | 230.8 kB (+1.1 kB) · 451 B CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 313.1 kB (+1.1 kB) · 2.7 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 110.7 kB (+1.1 kB) · 20.1 kB CSS (+39 B) | — | — · — · — |
| TableCell | 110.8 kB (+1.1 kB) · 20.3 kB CSS (+24 B) | — | — · — · — |
| lab/DialogHeroHeader | 94.3 kB (+1.1 kB) · 372 B CSS (0) | — | — · — · — |
| Popover | 108.1 kB (+1.1 kB) · 15.7 kB CSS (+32 B) | — | — · — · — |
| TableSelectionToolbar | 80.2 kB (+1.1 kB) · 14.6 kB CSS (+28 B) | — | — · — · — |
| TabMenu | 87.2 kB (+1.1 kB) · 12.5 kB CSS (+25 B) | — | — · — · — |
| TopNavMegaMenu | 84.3 kB (+1.1 kB) · 13.2 kB CSS (+26 B) | — | — · — · — |
| CodeBlock · Storybook | 85.7 kB (+1.1 kB) · 12.9 kB CSS (+26 B) | 2,277 (0) | — · ✓ · — |
| ListItem | 83.9 kB (+852 B) · 12.8 kB CSS (+277 B) | — | — · — · — |
| CheckboxInput · Storybook | 73.2 kB (+829 B) · 10.9 kB CSS (+299 B) | 450 (−7) | — · ✓ · — |
| MobileNav | 82.0 kB (+1.1 kB) · 11.8 kB CSS (+23 B) | — | — · — · — |
| CheckboxListItem | 84.7 kB (+848 B) · 12.8 kB CSS (+277 B) | — | — · — · — |
| Calendar | 80.8 kB (+1.1 kB) · 11.8 kB CSS (+21 B) | — | — · — · — |
| MobileNavToggle | 71.3 kB (+1.1 kB) · 11.8 kB CSS (+23 B) | — | — · — · — |
| DrawerHeader | 73.0 kB (+1.1 kB) · 14.3 kB CSS (+28 B) | — | — · — · — |
| AppShell | 93.8 kB (+1.1 kB) · 15.0 kB CSS (+26 B) | — | — · — · — |
| TopNav | 73.1 kB (+1.1 kB) · 12.1 kB CSS (+23 B) | — | — · — · — |
| lab/Schedule | 121.3 kB (+1.1 kB) · 3.9 kB CSS (0) | — | — · — · — |
| ChatLayout | 93.4 kB (+1.1 kB) · 11.7 kB CSS (+22 B) | — | — · — · — |
| lab/DiffViewer | 98.7 kB (+1.1 kB) · 2.3 kB CSS (0) | — | — · — · — |
| SideNav | 117.9 kB (+1.0 kB) · 12.6 kB CSS (+23 B) | — | — · ✓ · — |
| IconButton | 69.6 kB (+1.0 kB) · 11.2 kB CSS (+26 B) | — | — · — · — |
| Banner · Storybook | 71.7 kB (+1.0 kB) · 11.7 kB CSS (+23 B) | 523 (0) | — · ✓ · — |
| Stepper | 71.3 kB (+1.0 kB) · 11.3 kB CSS (+23 B) | — | — · — · — |
| DialogHeader | 72.9 kB (+1.0 kB) · 12.9 kB CSS (+26 B) | — | — · — · — |
| ChatSendButton | 70.0 kB (+1.0 kB) · 11.2 kB CSS (+26 B) | — | — · — · — |
| Button · Storybook | 69.6 kB (+1.0 kB) · 11.2 kB CSS (+26 B) | 808 (−26) | — · ✓ · — |
| ChatLayoutScrollButton | 70.1 kB (+1015 B) · 11.4 kB CSS (+24 B) | — | — · — · — |
| SideNavCollapseButton | 70.4 kB (+1008 B) · 11.3 kB CSS (+25 B) | — | — · — · — |
| ChatDictationButton | 70.1 kB (+1001 B) · 11.3 kB CSS (+23 B) | — | — · — · — |
| lab/TabBarMoreList | 107.3 kB (+971 B) · 1.8 kB CSS (0) | — | — · — · — |
| lab/CommentPin | 63.2 kB (+938 B) · 1.2 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 73.6 kB (+912 B) · 162 B CSS (0) | — | — · — · — |
| InputGroupText | 7.5 kB (+384 B) · 4.1 kB CSS (+185 B) | — | — · — · — |
| DropdownMenuSubMenu | 82.8 kB (+197 B) · 11.4 kB CSS (+321 B) | — | — · — · — |
| CommandPaletteInput | 34.7 kB (+141 B) · 8.3 kB CSS (+351 B) | — | — · — · — |
| ChatToolCalls | 33.6 kB (+144 B) · 9.2 kB CSS (+347 B) | — | — · — · — |
| NavHeadingMenuItem | 19.9 kB (+141 B) · 7.0 kB CSS (+345 B) | — | — · — · — |
| CommandPalette | 84.7 kB (+159 B) · 13.8 kB CSS (+325 B) | — | — · — · — |
| Timer | 14.5 kB (+143 B) · 6.7 kB CSS (+336 B) | — | — · — · — |
| ChatMessageList | 29.1 kB (+130 B) · 7.8 kB CSS (+344 B) | — | — · — · — |
| Spinner | 25.7 kB (+125 B) · 6.9 kB CSS (+342 B) | — | — · — · — |
| Heading | 12.9 kB (+116 B) · 6.1 kB CSS (+339 B) | — | — · — · — |
| ProgressBar | 12.6 kB (+102 B) · 7.0 kB CSS (+316 B) | — | — · — · — |
| charts/ChartLegend | 42.6 kB (+166 B) · 224 B CSS (0) | — | — · — · — |
| lab/LineClamp | 14.6 kB (+151 B) · 168 B CSS (0) | — | — · — · — |
| ContextMenuItem | 40.0 kB (+98 B) · 7.3 kB CSS (0) | — | — · — · — |
| lab/CodeEditor | 14.8 kB (+85 B) · 743 B CSS (0) | — | — · — · — |
| TabList | 48.6 kB (+36 B) · 6.8 kB CSS (0) | — | — · ✓ · — |
| HoverCard | 31.2 kB (+32 B) · 4.8 kB CSS (0) | — | — · — · — |
| Toolbar · Storybook | 48.5 kB (+22 B) · 8.6 kB CSS (0) | 371 (0) | — · ✓ · — |
| TreeList | 47.8 kB (+9 B) · 6.0 kB CSS (0) | — | — · — · — |
| AvatarStatusDot | 7.8 kB (0) · 3.6 kB CSS (0) | — | — · ✓ · — |
| BottomSheet | 77.2 kB (0) · 7.8 kB CSS (0) | — | — · — · — |
| BottomSheetSwitcher | 19.6 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| Breadcrumbs | 16.7 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| ButtonGroup · Storybook | 45.3 kB (0) · 3.7 kB CSS (0) | 155 (0) | — · ✓ · — |
| Card | 10.5 kB (0) · 7.0 kB CSS (0) | — | — · — · — |
| ChatComposerDrawer | 18.6 kB (0) · 4.8 kB CSS (0) | — | — · — · — |
| ChatMessage | 17.4 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| ChatMessageBubble | 7.7 kB (0) · 3.8 kB CSS (0) | — | — · — · — |
| ChatMessageMetadata | 21.0 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| CheckIndicator | 9.0 kB (0) · 681 B CSS (0) | — | — · — · — |
| Citation | 21.3 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| ClickableCard | 19.6 kB (0) · 7.9 kB CSS (0) | — | — · — · — |
| Collapsible | 30.1 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| CollapsibleGroup | 7.1 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| CommandPaletteFooter | 17.7 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 13.9 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| CommandPaletteList | 16.6 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| Dialog | 29.0 kB (0) · 7.3 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 30.2 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 29.4 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioGroup | 6.7 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 30.3 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| EmptyState | 7.2 kB (0) · 510 B CSS (0) | — | — · — · — |
| FieldStatus | 10.9 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| FormLayout | 7.0 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| Icon | 8.8 kB (0) · 681 B CSS (0) | — | — · — · — |
| Item | 21.6 kB (0) · 6.2 kB CSS (0) | — | — · — · — |
| Kbd | 17.4 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| LayerProvider | 4.4 kB (0) · 20 B CSS (0) | — | — · — · — |
| Layout | 7.3 kB (0) · 2.3 kB CSS (0) | — | — · — · — |
| LayoutContent | 18.2 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| LayoutFooter | 6.5 kB (0) · 1.7 kB CSS (0) | — | — · — · — |
| LayoutHeader | 6.6 kB (0) · 1.7 kB CSS (0) | — | — · — · — |
| LayoutPanel | 22.4 kB (0) · 5.1 kB CSS (0) | — | — · — · — |
| LinkProvider | 3.8 kB (0) · 20 B CSS (0) | — | — · — · — |
| List | 19.7 kB (0) · 810 B CSS (0) | — | — · — · — |
| MetadataList | 17.5 kB (0) · 3.8 kB CSS (0) | — | — · — · — |
| MetadataListItem | 7.2 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 19.5 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| Outline | 27.2 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| OverflowList | 12.8 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Overlay | 24.1 kB (0) · 4.1 kB CSS (0) | — | — · — · — |
| ResizeHandle | 22.5 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| ScrollableArea | 11.6 kB (0) · 4.4 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 19.9 kB (0) · 4.4 kB CSS (0) | — | — · — · — |
| SelectableCard | 19.8 kB (0) · 8.1 kB CSS (0) | — | — · — · — |
| SelectorOption | 25.4 kB (0) · 6.8 kB CSS (0) | — | — · — · — |
| SideNavSection | 7.2 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| StackItem | 16.7 kB (0) · 219 B CSS (0) | — | — · — · — |
| Step | 32.5 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| Tab | 15.3 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| TableBody | 6.8 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableRow | 7.3 kB (0) · 4.1 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 42.5 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Token | 31.4 kB (0) · 5.0 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.9 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuFeaturedCard | 8.6 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 15.6 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TypeaheadItem | 6.7 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| lab/ChatTypingIndicator | 26.6 kB (0) · 612 B CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 58.0 kB (0) · 223 B CSS (0) | — | — · — · — |
| lab/CircularProgress | 9.1 kB (0) · 859 B CSS (0) | — | — · — · — |
| lab/MediaPlayer | 31.3 kB (0) · 165 B CSS (0) | — | — · — · — |
| lab/MediaPlayerElement | 7.0 kB (0) · 177 B CSS (0) | — | — · — · — |
| lab/NavigationScreen | 86.8 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 86.8 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/PageControl | 79.4 kB (0) · 709 B CSS (0) | — | — · — · — |
| lab/TabBar | 84.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 8.03 MB packed (+6.4 kB); no new dependencies.
Wide change (38 components): add ci:run-visual for Visual, ci:run-rtl for RTL.
CI impact: 0 job-min per update · pool 0% · standard runners · 2 CI action or script files changed (not measured)
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 228.8 | 228.8 | 0 |
| Runner pool, runner-minutes a day | 54,880 | 54,880 | 0 (0%) |
| Average concurrent jobs | 38.1 | 38.1 | 0 |
| Time to green (median → this run) | — | 49.2 min | — |
| Runs a day | 240 | 240 | 0 |
Not measured (the jobs that use these keep their recent minutes above): .github/scripts/lib/a11y-spec-files.mjs, .github/scripts/lib/a11y-spec-files.test.mjs.
Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.
Accessibility: 7 violation(s)
Accessibility Audit
Status: 7 accessibility violation(s) found — 7 serious.
FileInput - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 3/16 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
InputGroup - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/26 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
PowerSearch - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 2/37 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Text - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/24 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Timestamp - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/21 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Tokenizer - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 2/32 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Tooltip - 1 issue(s)
- 🟠 serious: Ensure elements that have scrollable content are accessible by keyboard in Safari
- Rule:
scrollable-region-focusable· Affects 1/29 stories · Learn more - WCAG: 2.1.1, 2.1.3 (Level A)
- Rule:
Generated by PR Enrichment workflow | View full report
…st show The stand-in description no longer plays the tooltip role, so the page holds one tooltip per trigger. It renders through a portal into the body of the trigger's document, so it sits in no paragraph and no sibling rule. A server render carries no description and no reference until it hydrates. TOOLTIP_PATTERN's rows that read the tooltip apply once it has shown, and a new row checks the hidden copy before then.
|
/approve-spec d577906 |
There was a problem hiding this comment.
Changes requested. Mounting the tooltip layer at the first show works for a trigger in the page's own document, and the Tooltip record changes are approved for this head, but two cases leave the trigger's description pointing at nothing, and a few fixes are needed before this can land:
- A show that waits for its trigger to get a box (
isOpen,isDefaultOpenorshow()on a hidden trigger) removes the hidden copy before the layer mounts, soaria-describedbynames a missing element and stays broken if the tooltip closes first (useTooltip.tsx:372-375). - A trigger inside a shadow root references a copy portalled into the document body, which its
aria-describedbycannot reach, so it has no description until the first show (useTooltip.tsx:368-371). createLayerMountFlagtracks the layer's mount in a second store instead of reading the layer runtime's own mount store, which is how the first case drifts (useTooltip.tsx:283-305).canPortalreimplementsuseIsHydrating()fromhooks/useIsHydrating.ts; call the shared hook instead (useTooltip.tsx:363-367).- Switch's disabled reason and MultiSelector's status button still render
aria-describedby=""in server markup, unlike the five callers this change guards (Switch.tsx:932-934,MultiSelector.tsx:2764). - The accessibility-tree check of the trigger's description now runs only after the first show, so no browser lane proves the description every unshown trigger carries (
internal/a11y-spec/src/patterns/tooltip.ts:339). - The description's user impact says each closed layer made two
getComputedStylecalls as it mounted, but the base already defers that read until a layer's first show, so that clause should go.
Reading the layer's real mount fixes the first and third points together. Placing the copy in the trigger's shadow root changes FR2's "in the body of the trigger's document", so the record needs a fresh /approve-spec at the new head.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: closed tooltips mount no layer, and a table of tooltips mounts none: verified by the new suite, which fails on the base.
- Claim: hover, focus and tap open as before: verified for hover and focus in Chromium and jsdom, tap in jsdom.
- Claim: until the first show the trigger names a hidden copy with the same text: verified in the page's own document; false for a show that waits for its trigger and for a shadow-root trigger.
- Claim: the server render names no description and
describedByis empty there and while hydrating: verified by the new SSR tests, which fail on the base. - Claim: the layer mounts in the same commit as the first show: false when the show waits for the trigger's box.
- Claim: the copy and the layer are never in the page together: verified.
- Claim: core callers that set the attribute directly leave it off when empty: false for Switch and the MultiSelector status button.
- Claim: each closed layer read its writing context at mount: false; the base defers that read.
- Claim: no prop or type changes: verified with the API surface generator.
- Claim: rewritten tests check the same outcomes, suites pass, typecheck clean, knowledge check aligned: verified for the suites run here.
- Claim: page freeze length and trace numbers: not verifiable from the repository.
- Files:
useTooltip.tsx: findings above;tooltip.ts(a11y pattern): accessibility-tree gap; the changeset: its description sentence is false in the two cases above;Tooltip.spec.md: approved, FR2 wording changes with the shadow-root fix. - Files:
Tooltip.tsx,InfoTip.tsx,Selector.tsx,CheckboxInput.tsx,Slider.tsx,tooltip.fixtures.ts,TooltipA11y.stories.tsx,Tooltip.test.tsx,Tooltip.ssr.test.tsx, the Tooltip a11y binding files,tooltipDescription.tsand the 15 consumer test files: clear.
…s root The swap from the hidden copy to the tooltip reads the layer runtime's mount store, so a show that waits for its trigger's box keeps the copy until the layer mounts. A trigger in a shadow root keeps the copy in that root. Switch and the MultiSelector status button leave an empty describedby off. TOOLTIP_PATTERN checks the computed description before the first show.
…oltip-mount-on-first-intent
Tests that read a tooltip's layer before it opened now read the trigger's description: the hidden copy until the layer mounts, then the tooltip. Tests that need the open tooltip show it first. Each test keeps its user-visible assertion.
|
/approve-spec 01af4ed |
There was a problem hiding this comment.
Changes requested. Mounting the tooltip layer at its first show works as the approved Tooltip record describes, and the hidden copy keeps every trigger described until then. Three small items remain:
- Miss: the changeset says closed tooltip layers "kept such pages busy for seconds", but the description's own trace puts them at about 250 ms of long tasks on a 100-row table at 4x CPU with the first render unchanged, so please state the measured effect instead.
- Miss:
useInputStatusIcon.tsx:220,DateInput.tsx:989-991,DateTimeInput.tsx:1853-1857andDateRangeInput.tsx:919-923still pass the emptydescribedBystraight through, so their server and hydrating markup carriesaria-describedby="", against the description's statement that server markup carries noaria-describedby; adding|| undefinedthere (as the changeset advises consumers) fixes it. - The change grows two shared modules (
useTooltip.tsx,useLayer.tsx), and the import-boundaries contract asks such a change to report the first-load gzip delta on the four reference pages; the repository'ssize:pagesscript gives docs +289 B, form +267 B, menu +230 B and table +225 B, which the description can quote or replace with its own run.
The new comment at useTooltip.tsx:336-340 could be shorter; that one is optional.
Claims and files checked
Review mode: same-head; reason: none
- Tooltips, including the ones inside other components, mount their layer at the first hover, focus or tap: verified (hook options, the new layer-mount tests, a browser probe)
- A table with a tooltip on every row mounts no closed tooltip layers: verified (a hundred closed tooltips mount none; no tooltip element before interaction in the browser)
- Closed layers kept such pages busy for seconds: false by the description's own trace (about 250 ms of long tasks; the first render unchanged)
- Until the first show, the trigger names a hidden copy and screen readers read the same description: verified (Chromium accessibility tree)
- Server and hydrating markup carry no description reference: verified for Tooltip and InfoTip; the field status-icon button and three date-input buttons render an empty attribute there
- Core callers that write the attribute directly leave it off when it is empty: verified for the seven listed callers; false for the status-icon hook and three date-input buttons
- The layer mounts in the same commit as the first show, stays mounted, and never shares the page with the copy: verified (code path; one mutation batch in Chromium)
- A show that waits for its trigger, or is cancelled, keeps the trigger described; a shadow-root trigger finds its copy: verified (tests pass)
- Hover, focus and tap open the tooltip exactly as before: verified (identical frames; hover-bridge, focus-return, touch and entrance browser tests pass)
- No public prop or type changes: verified (the new internal type is reachable from no package entry point)
- The new layer-mount tests and the server-render tests fail on the base and pass here: verified for the first two layer-mount cases and both server-render cases
- Updated tests keep their outcomes: verified (41 changed test files and 58 other tooltip-related test files pass)
- Type check and knowledge check are clean: verified for the core package, the accessibility-spec package and the knowledge check
- Trace numbers and the full test-suite run: not reproduced
.changeset/tooltip-layer-mounts-on-first-show.md: finding: the "busy for seconds" sentence overstates the measured savingdocs/specs/components/Tooltip/Tooltip.spec.md: clear (FR2, AR1 and PR2 approved by an engineering owner for this commit)internal/a11y-spec/src/patterns/tooltip.fixtures.ts: clearinternal/a11y-spec/src/patterns/tooltip.ts: clearpackages/core/src/CheckboxInput/CheckboxInput.tsx: clearpackages/core/src/InfoTip/InfoTip.tsx: clearpackages/core/src/Layer/useLayer.tsx: clear (shared module growth needs the reference-page report)packages/core/src/MultiSelector/MultiSelector.tsx: clearpackages/core/src/Selector/Selector.tsx: clearpackages/core/src/Slider/Slider.tsx: clearpackages/core/src/Switch/Switch.tsx: clearpackages/core/src/Tooltip/Tooltip.tsx: clearpackages/core/src/Tooltip/useTooltip.tsx: finding: its emptydescribedBystill reaches four callers that write it directly; shared module growth needs the reference-page report; one long comment (non-blocking)- Tests and stories, each clear:
TooltipA11y.stories.tsx,Avatar.test.tsx,Banner.test.tsx,CheckboxInput.test.tsx,CheckboxList.test.tsx,CodeBlock.test.tsx,ComplexSelector.test.tsx,DateInput.test.tsx,DateRangeInput.test.tsx,DateTimeInput.test.tsx,DateTimeInputTouch.test.tsx,InputClearButton.test.tsx,FileInput.test.tsx,InfoTip.pin.test.tsx,InfoTip.test.tsx,LayerEntranceSide.interaction.browser.spec.ts,touchTriggerTargets.test.tsx,Link.test.tsx,MultiSelector.test.tsx,NumberInput.test.tsx,Pagination.test.tsx,PowerSearch.test.tsx,RadioList.test.tsx,SegmentedControl.test.tsx,Selector.test.tsx,SideNav.test.tsx,Slider.test.tsx,Switch.test.tsx,Text.test.tsx,TextArea.test.tsx,TextInput.test.tsx,NativeTimeInput.test.tsx,TimeInput.test.tsx,Tokenizer.test.tsx,Tooltip.ssr.test.tsx,Tooltip.test.tsx,Tooltip.a11y.chromium.spec.ts,Tooltip.a11y.states.ts,Tooltip.a11y.test.tsx,Typeahead.test.tsx,tooltipDescription.ts,useInputStatusIcon.test.tsx,ListInput.test.tsx,RichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,CodeBlockHeaderPlugin.test.tsx
…escribedby off The field status-icon button and the DateInput, DateTimeInput and DateRangeInput disabled-reason buttons no longer write an empty aria-describedby in server and hydrating markup. The changeset states the measured effect.
|
/approve-spec 40849da |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
Mounting the tooltip layer at its first show matches the Tooltip record as approved for this head (FR2, AR1, PR2), and this head fixes the three items from the last review: the changeset states the measured effect, the status-icon and date-input buttons no longer render an empty aria-describedby, and the description reports the four reference-page size deltas. Nothing blocks.
Optional follow-up:
- The hook's toggle-trigger guidance (
useTooltip.doc.mjslines 144 and 208, theshow()JSDoc) and theTooltipHookUsagetemplate block still setaria-describedbyandaria-controlsstraight todescribedBy, which now writes empty attributes in server markup;describedBy || undefined, witharia-controlsonly while shown asInfoTipdoes, would match the changeset's advice.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- A page with a tooltip on every row froze for seconds in one app: not reproducible here (an app outside this repository); the description's own trace bounds the closed-layer share at about 250 ms and claims nothing beyond it.
- On main every closed tooltip mounted its layer with its trigger: verified (base
useTooltiphas no lazy mount; base Default story holds one closedrole="tooltip"per trigger). - A page of closed tooltips now mounts no layer: verified (hundred-tooltip test; Multiple Tooltips story holds 0 tooltip elements, base 3).
- Hover, keyboard focus and tap open the tooltip exactly as before: verified (hover, focus and tap suites pass; closed, hovered and focused frames are pixel-identical to the base).
- Screen readers read the same description before any hover: verified (the hidden copy holds the same text; accessible-description assertions and the accessibility-tree row).
useTooltipuses the layer runtime'slazyMountwithkeepsMountAfterShow, as ContextMenu does, mounting in the commit of the first show and then staying: verified (useTooltip.tsx:323-324,ContextMenu.tsx:445-446; first-show and keep-layer tests).- Server and hydrating markup carry no
aria-describedbyand no copy, while main named an id missing from its markup: verified (Tooltip.ssr.test.tsx; a server-markup scan of six components, 0 references at head, 1-3 missing ids each on the base). - Until the layer mounts the trigger names a plain hidden copy in its shadow root or its document's body: verified (
useTooltip.tsx:287-296,:1039-1046; browser probe; shadow-root test). - The copy leaves in the commit that mounts the layer, read from the runtime's own mount store, and a waiting or cancelled show keeps it: verified (
useTooltip.tsx:340-344,useLayer.tsx:1350-1353; waiting-show test). describedByis empty in server and hydrating renders, and the eleven listed core callers and the hook's JSDoc example leave the attribute off then: verified (each call site; server-markup scan;useTooltip.tsx:277).- No public prop or type changes; the internal layer result gains a mount store: verified (API surface comparison of base and head builds: 0 rows).
- Tooltip FR2, AR1 and PR2 change and FR3-FR5 do not: verified (record diff).
- The import-boundaries rule on ARIA references in server markup is met: verified (server markup carries no reference, the rule's second branch).
- The tooltip accessibility pattern gains two required before-first-show rows, one conforming and two violating fixtures, and a before-first-show state and story: verified (pattern, fixtures, states and story diffs).
- The hundred-tooltip and first-hover cases and both server-render cases fail on main and pass here: verified (red-first run at the previous commit, tests unchanged; the 45 related suites pass here).
- First-load JavaScript on the four reference pages grows by 293, 270, 239 and 224 B gzip: verified within 9 B (repository script over base and head Core builds: +289, +266, +230, +228 B).
- The farm-trace timings (long-task total 1,256 to 994 ms at this head): not reproduced; the author's measurement.
- Tests that read a closed tooltip now read its description or show it first, each keeping its outcome: verified (every changed test read; the 45 related suites pass).
- The entrance-side browser spec marks the tooltip layer as not mounted while closed: verified (spec diff).
- The whole UI suite, typecheck and knowledge check pass: partly verified (Core and accessibility-spec typecheck clean, knowledge check aligned, 45 related suites pass; the whole suite was not rerun).
- Changeset: closed layers no longer mount, cutting about a fifth of long-task time (about 250 ms); the trigger names a hidden copy until the first show; a server render names none; callers leave an empty
describedByoff: verified (1,256 to 994 ms is 21%; probes and call sites above).
Files:
Tooltip/useTooltip.tsx: clear (non-blocking guidance note at:246-248);Tooltip/Tooltip.tsx,Layer/useLayer.tsx: clear.InfoTip.tsx,CheckboxInput.tsx,Slider.tsx,Switch.tsx,Selector.tsx,MultiSelector.tsx,DateInput.tsx,DateTimeInput.tsx,DateRangeInput.tsx,hooks/useInputStatusIcon.tsx: clear.docs/specs/components/Tooltip/Tooltip.spec.md: clear (approved for this head);.changeset/tooltip-layer-mounts-on-first-show.md: clear.internal/a11y-spec/src/patterns/tooltip.ts,tooltip.fixtures.ts,Tooltip.a11y.states.ts,Tooltip.a11y.test.tsx,Tooltip.a11y.chromium.spec.ts,apps/storybook/stories/TooltipA11y.stories.tsx: clear.Tooltip.test.tsx,Tooltip.ssr.test.tsx,__tests__/tooltipDescription.ts: clear.- Core tests for Avatar, Banner, CheckboxInput, CheckboxList, CodeBlock, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, DateTimeInputTouch, InputClearButton, FileInput, InfoTip, InfoTip.pin, LayerEntranceSide (browser), touchTriggerTargets, Link, MultiSelector, NumberInput, Pagination, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, Text, TextArea, TextInput, NativeTimeInput, TimeInput, Tokenizer, Typeahead and useInputStatusIcon: clear.
- Lab
ListInput.test.tsx; richtextRichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,CodeBlockHeaderPlugin.test.tsx: clear.
|
/approve-spec 925a587 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this draft revision yet, so the merge guard waits for the required checks before merging.
The hover tests in Timestamp.test.tsx, RichTextEditor.portalHost.test.tsx and RichTextEditorToolbarLink.test.tsx now send the move a browser sends with the arrival, so the lazy layer mounts and they no longer wait on a tooltip that never shows. The Tooltip record changes carry an engineering owner's approval for this revision. Three optional notes stay open on their earlier threads: the copy's id-suffix test selectors, word joins in getNodeText, and Avatar's unreferenced copy.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- A page of closed tooltips mounts no layer; the layer mounts at the first hover, focus, tap,
isOpenorshow(), in that commit, and then stays: verified (useTooltip.tsx:413-414;Tooltip.test.tsx"Tooltip layer mounts at its first show"). - Hover, keyboard focus and tap open the tooltip exactly as before: verified in the code (the hover, focus and tap handlers are unchanged by this pull request), and every hover test now sends the arrival's move (
Timestamp.test.tsx:1330,:1364;RichTextEditor.portalHost.test.tsx:89;RichTextEditorToolbarLink.test.tsx:158). - The freeze reported in an outside app's table, the first-load size table and the benchmark: the author's measurements, not rechecked.
- Until the first show the trigger names a hidden copy after it, never inside it; in the commit that mounts the layer the copy is removed and the content takes the same id; the copy returns if the layer unmounts: verified (
useTooltip.tsx:1190-1214,Layer/useLayer.tsx:1214-1227; the renders-once case inTooltip.test.tsx). - Hook-built tooltips and a plain-text
Tooltipname the copy in server HTML, while an element child oranchorReftrigger names it after hydration: verified (Tooltip.ssr.test.tsx; the attach wiring inTooltip.tsx). - Plain text becomes one string through the shared
getNodeText, which joins block lines with a space: verified (utils/getNodeText.ts:31); see the optional note on inline markup. - Component content renders as it is into a copy that starts empty in server markup and is filled through a portal, so its effects run before the first show, as the changeset and the
contentJSDoc say: verified (useTooltip.tsx:303-338;Tooltip.tsxcontentJSDoc). - Once mounted, a describing tooltip's content is not
aria-hidden; a cut-label tooltip keeps itaria-hiddenunless pinned, returns an emptydescribedBy, renders no copy and gives its content no id: verified (useTooltip.tsx:1193,:1198,:1268;Tooltip.tsx:397). - A Button tooltip that repeats the name gets no copy and no
aria-describedby, and once shown its content keeps an id and is notaria-hidden, as onmain: verified (Button.tsx:1163). - The no-description and description-id contexts and the tooltip-id helper live in the existing internal trigger contract, and no package entry exports them: verified (
tooltipPresentInterest.ts:48-90; Core's export map). - Text's and Heading's truncation tooltips render under the no-description context: verified (
Text/TruncationTooltip.tsxloadsUndescribedTooltip;Tooltip.tsx:397). - Group trailing corners skip only the copy, by its private marker, and a caller's own hidden follower still counts as a member: verified (
privateAttributes/tooltipDescription.stylex.ts:42-43;ButtonGroup.test.tsx; the corners story). - The trailing-edge styles moved whole with last-wins order unchanged, and the InputGroup addon rule matches the same elements: verified (
Button.tsx:919-963,InputGroup/groupStyles.ts:85-89). describedBynow names the description, and the JSDoc, doc file and changeset say so; the toggle recipe needs onlyaria-describedbyandaria-expanded; InfoTip and Slider find the tooltip through a private helper: verified (useTooltip.tsx:1268,useTooltip.doc.mjs,InfoTip.tsx:205,Slider.tsx:718).- CheckboxInput's reason is the tooltip's own description under the id the input already names, and renders once: verified (
CheckboxInput.tsx:663; the reason-once test). - The record changes FR2, FR10, FR12, AR1, PR2 and the ownership line, and the context route extends an existing owner: verified.
- The file map of the smallest restoration, including the owner module of the private marker and the cut-label check that reads it: verified (
privateAttributes/tooltipDescription.stylex.ts,Text/cutText.tsx:88-101). - The pattern rows for the copy have conforming and violating fixtures, and the Astryx binding declares that it describes with a copy: verified (
tooltip.ts,tooltip.fixtures.ts,Tooltip.a11y.states.ts). - The named tests and specs exist and assert what the description says: verified by reading; not run on this revision.
- Since merging the still-pointer fix from
main, this branch's hover tests send the move that arms the show, and a pre-show check reads the mount marker: verified (the four hover sites above; no other test opens a tooltip withmouseenteralone). - The browser and screen-reader observations: stated in text for earlier revisions, not rechecked.
- The unit suites, typecheck, pattern tests, knowledge and changeset checks and the boundary check pass: stated for earlier revisions; not run on this revision.
- The notes on earlier revisions (main merges, preflight fixes, review fixes, no-description paths): verified against the code at this revision.
- Changeset: the layer mounts at the first hover, focus or tap, a hidden copy describes the trigger until then, server and hydration timing follow the trigger kind, component content runs its effects from mount, and the
describedBymeaning and the toggle recipe change: verified.
Files:
internal/test-utils/src/setup.ts: optional: finds the copy by its id suffixpackages/core/src/__tests__/tooltipDescription.ts: optional: finds the copy by its id suffixpackages/core/src/Avatar/Avatar.test.tsx: optional: reads a copy that nothing referencespackages/core/src/Tooltip/useTooltip.tsx: optional: inline markup splits words in the copy- Clear,
.changeset/:tooltip-layer-mounts-on-first-show.md - Clear,
.github/scripts/lib/:a11y-spec-files.mjs,a11y-spec-files.test.mjs - Clear,
apps/docsite/e2e/:changelog.spec.ts,docs-hydration.spec.ts,home-late-script.spec.ts,liveTooltips.ts - Clear,
apps/storybook/stories/:ButtonGroupCornersA11y.stories.tsx,Tooltip.stories.tsx,TooltipA11y.stories.tsx,TooltipDecorator.stories.tsx,TooltipDescriptionA11y.stories.tsx - Clear,
docs/specs/components/Tooltip/:Tooltip.spec.md - Clear,
internal/a11y-spec/src/patterns/:tooltip.fixtures.ts,tooltip.ts - Clear,
packages/cli/:api/template/use-truncation-hook-usage.test.tsx,api/theme-edit/theme-part-counts-reached-fill.test.mjs - Clear,
packages/core/src/:Banner/Banner.test.tsx,Button/Button.test.tsx,Button/Button.truncationTooltip.test.tsx,Button/Button.tsx,ButtonGroup/ButtonGroup.test.tsx,ButtonGroup/__tests__/ButtonGroupCorners.interaction.browser.spec.ts,CheckboxInput/CheckboxInput.test.tsx,CheckboxInput/CheckboxInput.tsx,CheckboxList/CheckboxList.test.tsx,CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts,CodeBlock/CodeBlock.test.tsx,ComplexSelector/ComplexSelector.test.tsx,DateInput/DateInput.test.tsx,DateInput/DateInput.tsx,DateRangeInput/DateRangeInput.test.tsx,DateRangeInput/DateRangeInput.tsx,DateTimeInput/DateTimeInput.test.tsx,DateTimeInput/DateTimeInput.tsx,DateTimeInput/DateTimeInputTouch.test.tsx,Field/InputClearButton.test.tsx,FileInput/FileInput.test.tsx,InfoTip/InfoTip.pin.test.tsx,InfoTip/InfoTip.test.tsx,InfoTip/InfoTip.tsx,InfoTip/__tests__/InfoTipAudit.a11y.chromium.spec.ts,InputGroup/groupStyles.ts,Layer/__tests__/LayerEntranceSide.interaction.browser.spec.ts,Layer/touchTriggerTargets.test.tsx,Layer/useLayer.tsx,Link/Link.test.tsx,MultiSelector/MultiSelector.test.tsx,MultiSelector/MultiSelector.tsx,NumberInput/NumberInput.test.tsx,Pagination/Pagination.test.tsx,PowerSearch/PowerSearch.statusTooltip.test.tsx,PowerSearch/PowerSearch.test.tsx,RadioList/RadioList.test.tsx,SegmentedControl/SegmentedControl.test.tsx,Selector/Selector.test.tsx,Selector/Selector.tsx,SideNav/SideNav.test.tsx,Slider/Slider.test.tsx,Slider/Slider.tsx,Switch/Switch.test.tsx,Switch/Switch.tsx,TabList/__tests__/TabDescription.test.tsx,Text/Text.test.tsx,Text/cutText.tsx,TextArea/TextArea.test.tsx,TextInput/TextInput.test.tsx,TimeInput/NativeTimeInput.test.tsx,TimeInput/TimeInput.test.tsx,Timestamp/Timestamp.test.tsx,Tokenizer/Tokenizer.statusTooltip.test.tsx,Tokenizer/Tokenizer.test.tsx,Tokenizer/TokenizerBottomSheet.test.tsx,Toolbar/Toolbar.test.tsx,Tooltip/Tooltip.ssr.test.tsx,Tooltip/Tooltip.test.tsx,Tooltip/Tooltip.tsx,Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts,Tooltip/__tests__/Tooltip.a11y.states.ts,Tooltip/__tests__/Tooltip.a11y.test.tsx,Tooltip/__tests__/TooltipDecorator.a11y.browser.spec.ts,Tooltip/__tests__/TooltipDescription.a11y.browser.spec.ts,Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts,Tooltip/tooltipPresentInterest.ts,Tooltip/useTooltip.doc.mjs,Tooltip/useTooltip.test.tsx,Typeahead/Typeahead.statusTooltip.test.tsx,Typeahead/Typeahead.test.tsx,hooks/useInputStatusIcon.test.tsx,hooks/useInputStatusIcon.tsx,privateAttributes/tooltipDescription.stylex.ts,utils/sharedRealm.ts - Clear,
packages/lab/src/:ListInput/ListInput.test.tsx - Clear,
packages/richtext/src/:RichTextEditor.portalHost.test.tsx,RichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,internal/CodeBlockHeaderPlugin.test.tsx
|
/approve-spec 794f3de |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this draft revision yet, so the merge guard waits for the required checks before merging.
Since the last review, the merge of main brings the shared getNodeText fix, so a tooltip's hidden description now reads inline markup as written ("unlikely", not "un like ly"), and the new Tooltip.test.tsx case pins it. The Tooltip record changes carry an engineering owner's approval for this revision. Two optional notes stay open on their earlier threads: the copy's id-suffix test selectors and Avatar's unreferenced copy.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- A page of closed tooltips mounts no layer; the layer mounts at the first hover, focus, tap,
isOpenorshow(), in that commit, and then stays: verified (useTooltip.tsx:413-414;Tooltip.test.tsx"Tooltip layer mounts at its first show"). - Hover, keyboard focus and tap open the tooltip exactly as before: verified in the code (the hover, focus and tap handlers are unchanged by this pull request), and every hover test sends the arrival's move.
- The freeze reported in an outside app's table, the first-load size table and the benchmark: the author's measurements, not rechecked.
- Until the first show the trigger names a hidden copy after it, never inside it; in the commit that mounts the layer the copy is removed and the content takes the same id; the copy returns if the layer unmounts: verified (
useTooltip.tsx:1188-1200,Layer/useLayer.tsx:1214-1227; the renders-once case inTooltip.test.tsx). - Hook-built tooltips and a plain-text
Tooltipname the copy in server HTML, while an element child oranchorReftrigger names it after hydration: verified (Tooltip.ssr.test.tsx; the attach wiring inTooltip.tsx). - Plain text becomes one string through the shared
getNodeText, which joins block lines with a space: verified (utils/getNodeText.tsjoinPieces); inline markup now also keeps its words whole, and the newTooltip.test.tsxcase asserts "unlikely" and "March 1.". - Component content renders as it is into a copy that starts empty in server markup and is filled through a portal, so its effects run before the first show, as the changeset and the
contentJSDoc say: verified (useTooltip.tsx:303-338;Tooltip.tsxcontentJSDoc). - Once mounted, a describing tooltip's content is not
aria-hidden; a cut-label tooltip keeps itaria-hiddenunless pinned, returns an emptydescribedBy, renders no copy and gives its content no id: verified (useTooltip.tsx:1193,:1198,:1268;Tooltip.tsx:397). - A Button tooltip that repeats the name gets no copy and no
aria-describedby, and once shown its content keeps an id and is notaria-hidden, as onmain: verified (Button.tsx:1163). - The no-description and description-id contexts and the tooltip-id helper live in the existing internal trigger contract, and no package entry exports them: verified (
tooltipPresentInterest.ts:48-90; Core's export map). - Text's and Heading's truncation tooltips render under the no-description context: verified (
Text/TruncationTooltip.tsxloadsUndescribedTooltip;Tooltip.tsx:397). - Group trailing corners skip only the copy, by its private marker, and a caller's own hidden follower still counts as a member: verified (
privateAttributes/tooltipDescription.stylex.ts:42-43;ButtonGroup.test.tsx; the corners story). - The trailing-edge styles moved whole with last-wins order unchanged, and the InputGroup addon rule matches the same elements: verified (
Button.tsx:919-963,InputGroup/groupStyles.ts:85-89). describedBynow names the description, and the JSDoc, doc file and changeset say so; the toggle recipe needs onlyaria-describedbyandaria-expanded; InfoTip and Slider find the tooltip through a private helper: verified (useTooltip.tsx:1268,useTooltip.doc.mjs,InfoTip.tsx:205,Slider.tsx:718).- CheckboxInput's reason is the tooltip's own description under the id the input already names, and renders once: verified (
CheckboxInput.tsx:663; the reason-once test). - The record changes FR2, FR10, FR12, AR1, PR2 and the ownership line, and the context route extends an existing owner: verified.
- The file map of the smallest restoration, including the owner module of the private marker and the cut-label check that reads it: verified (
privateAttributes/tooltipDescription.stylex.ts,Text/cutText.tsx:88-101). - The pattern rows for the copy have conforming and violating fixtures, and the Astryx binding declares that it describes with a copy: verified (
tooltip.ts,tooltip.fixtures.ts,Tooltip.a11y.states.ts). - The named tests and specs exist and assert what the description says: verified by reading; not run on this revision.
- This branch's hover tests send the move that arms the show, and a pre-show check reads the mount marker: verified.
- The browser and screen-reader observations: stated in text for earlier revisions, not rechecked.
- The unit suites, typecheck, pattern tests, knowledge and changeset checks and the boundary check pass: stated for earlier revisions; not run on this revision.
- The notes on earlier revisions (main merges, preflight fixes, review fixes, no-description paths): verified against the code at this revision.
- Changeset: the layer mounts at the first hover, focus or tap, a hidden copy describes the trigger until then, server and hydration timing follow the trigger kind, component content runs its effects from mount, and the
describedBymeaning and the toggle recipe change: verified.
Files:
internal/test-utils/src/setup.ts: optional: finds the copy by its id suffixpackages/core/src/__tests__/tooltipDescription.ts: optional: finds the copy by its id suffixpackages/core/src/Avatar/Avatar.test.tsx: optional: reads a copy that nothing references- Clear,
.changeset/:tooltip-layer-mounts-on-first-show.md - Clear,
.github/scripts/lib/:a11y-spec-files.mjs,a11y-spec-files.test.mjs - Clear,
apps/docsite/e2e/:changelog.spec.ts,docs-hydration.spec.ts,home-late-script.spec.ts,liveTooltips.ts - Clear,
apps/storybook/stories/:ButtonGroupCornersA11y.stories.tsx,Tooltip.stories.tsx,TooltipA11y.stories.tsx,TooltipDecorator.stories.tsx,TooltipDescriptionA11y.stories.tsx - Clear,
docs/specs/components/Tooltip/:Tooltip.spec.md - Clear,
internal/a11y-spec/src/patterns/:tooltip.fixtures.ts,tooltip.ts - Clear,
packages/cli/:api/template/use-truncation-hook-usage.test.tsx,api/theme-edit/theme-part-counts-reached-fill.test.mjs - Clear,
packages/core/src/:Banner/Banner.test.tsx,Button/Button.test.tsx,Button/Button.truncationTooltip.test.tsx,Button/Button.tsx,ButtonGroup/ButtonGroup.test.tsx,ButtonGroup/__tests__/ButtonGroupCorners.interaction.browser.spec.ts,CheckboxInput/CheckboxInput.test.tsx,CheckboxInput/CheckboxInput.tsx,CheckboxList/CheckboxList.test.tsx,CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts,CodeBlock/CodeBlock.test.tsx,ComplexSelector/ComplexSelector.test.tsx,DateInput/DateInput.test.tsx,DateInput/DateInput.tsx,DateRangeInput/DateRangeInput.test.tsx,DateRangeInput/DateRangeInput.tsx,DateTimeInput/DateTimeInput.test.tsx,DateTimeInput/DateTimeInput.tsx,DateTimeInput/DateTimeInputTouch.test.tsx,Field/InputClearButton.test.tsx,FileInput/FileInput.test.tsx,InfoTip/InfoTip.pin.test.tsx,InfoTip/InfoTip.test.tsx,InfoTip/InfoTip.tsx,InfoTip/__tests__/InfoTipAudit.a11y.chromium.spec.ts,InputGroup/groupStyles.ts,Layer/__tests__/LayerEntranceSide.interaction.browser.spec.ts,Layer/touchTriggerTargets.test.tsx,Layer/useLayer.tsx,Link/Link.test.tsx,MultiSelector/MultiSelector.test.tsx,MultiSelector/MultiSelector.tsx,NumberInput/NumberInput.test.tsx,Pagination/Pagination.test.tsx,PowerSearch/PowerSearch.statusTooltip.test.tsx,PowerSearch/PowerSearch.test.tsx,RadioList/RadioList.test.tsx,SegmentedControl/SegmentedControl.test.tsx,Selector/Selector.test.tsx,Selector/Selector.tsx,SideNav/SideNav.test.tsx,Slider/Slider.test.tsx,Slider/Slider.tsx,Switch/Switch.test.tsx,Switch/Switch.tsx,TabList/__tests__/TabDescription.test.tsx,Text/Text.test.tsx,Text/cutText.tsx,TextArea/TextArea.test.tsx,TextInput/TextInput.test.tsx,TimeInput/NativeTimeInput.test.tsx,TimeInput/TimeInput.test.tsx,Timestamp/Timestamp.test.tsx,Tokenizer/Tokenizer.statusTooltip.test.tsx,Tokenizer/Tokenizer.test.tsx,Tokenizer/TokenizerBottomSheet.test.tsx,Toolbar/Toolbar.test.tsx,Tooltip/Tooltip.ssr.test.tsx,Tooltip/Tooltip.test.tsx,Tooltip/Tooltip.tsx,Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts,Tooltip/__tests__/Tooltip.a11y.states.ts,Tooltip/__tests__/Tooltip.a11y.test.tsx,Tooltip/__tests__/TooltipDecorator.a11y.browser.spec.ts,Tooltip/__tests__/TooltipDescription.a11y.browser.spec.ts,Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts,Tooltip/tooltipPresentInterest.ts,Tooltip/useTooltip.doc.mjs,Tooltip/useTooltip.test.tsx,Tooltip/useTooltip.tsx,Typeahead/Typeahead.statusTooltip.test.tsx,Typeahead/Typeahead.test.tsx,hooks/useInputStatusIcon.test.tsx,hooks/useInputStatusIcon.tsx,privateAttributes/tooltipDescription.stylex.ts,utils/sharedRealm.ts - Clear,
packages/lab/src/:ListInput/ListInput.test.tsx - Clear,
packages/richtext/src/:RichTextEditor.portalHost.test.tsx,RichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,internal/CodeBlockHeaderPlugin.test.tsx
There was a problem hiding this comment.
Changes requested: one required check fails on this revision.
- Found by CI: the required
lintcheck fails at "Check the comment-provenance baseline" becauseinternal/eslint-plugin-astryx/no-comment-provenance.baseline.jsonstill lists the cited comment sites this pull request removed fromButton.tsx(#2508andButtonGroup FR3) andInputGroup/groupStyles.ts(ButtonGroup FR3), so runnode internal/eslint-plugin-astryx/no-comment-provenance.baseline.mjsand commit the regenerated baseline.
The lint job's formatting and ESLint steps run only after that step passes, so they have no result yet. The Tooltip record changes carry an engineering owner's approval for this revision. Two optional notes stay open on their earlier threads: the copy's id-suffix test selectors and Avatar's unreferenced copy.
Claims and files checked
Review mode: same-head; reason: none
Claims:
- A page of closed tooltips mounts no layer; the layer mounts at the first hover, focus, tap,
isOpenorshow(), in that commit, and then stays: verified (useTooltip.tsx:413-414;Tooltip.test.tsx"Tooltip layer mounts at its first show"). - Hover, keyboard focus and tap open the tooltip exactly as before: verified in the code (the hover, focus and tap handlers are unchanged by this pull request), and every hover test sends the arrival's move.
- The freeze reported in an outside app's table, the first-load size table and the benchmark: the author's measurements, not rechecked.
- Until the first show the trigger names a hidden copy after it, never inside it; in the commit that mounts the layer the copy is removed and the content takes the same id; the copy returns if the layer unmounts: verified (
useTooltip.tsx:1180-1214,Layer/useLayer.tsx:1194-1227; the renders-once case inTooltip.test.tsx). - Hook-built tooltips and a plain-text
Tooltipname the copy in server HTML, while an element child oranchorReftrigger names it after hydration: verified (Tooltip.ssr.test.tsx; the attach wiring inTooltip.tsx). - Plain text becomes one string through the shared
getNodeText, which joins block lines with a space: verified (useTooltip.tsx:323-328,utils/getNodeText.ts). - Component content renders as it is into a copy that starts empty in server markup and is filled through a portal, so its effects run before the first show, as the changeset and the
contentJSDoc say: verified (useTooltip.tsx:303-338;Tooltip.tsxcontentJSDoc). - Once mounted, a describing tooltip's content is not
aria-hidden; a cut-label tooltip keeps itaria-hiddenunless pinned, returns an emptydescribedBy, renders no copy and gives its content no id: verified (useTooltip.tsx:1193,:1198,:1268;Tooltip.tsxUndescribedTooltip). - A Button tooltip that repeats the name gets no copy and no
aria-describedby, and once shown its content keeps an id and is notaria-hidden, as onmain: verified (Button.tsx:1161-1166). - The no-description and description-id contexts and the tooltip-id helper live in the existing internal trigger contract, and no package entry exports them: verified (
tooltipPresentInterest.ts:49-90; Core's export map). - Text's and Heading's truncation tooltips render under the no-description context: verified (
Text/TruncationTooltip.tsxloadsUndescribedTooltip). - Group trailing corners skip only the copy, by its private marker, and a caller's own hidden follower still counts as a member: verified (
privateAttributes/tooltipDescription.stylex.ts:42-43;ButtonGroup.test.tsx; the corners story). - The trailing-edge styles moved whole with last-wins order unchanged, and the InputGroup addon rule matches the same elements: verified (
Button.tsx:919-963,InputGroup/groupStyles.ts:81-89). describedBynow names the description, and the JSDoc, doc file and changeset say so; the toggle recipe needs onlyaria-describedbyandaria-expanded; InfoTip and Slider find the tooltip through a private helper: verified (useTooltip.tsx:1268,useTooltip.doc.mjs,InfoTip.tsx:205,Slider.tsx:716-719).- CheckboxInput's reason is the tooltip's own description under the id the input already names, and renders once: verified (
CheckboxInput.tsx:662-670; the reason-once test). - The record changes FR2, FR10, FR12, AR1, PR2 and the ownership line, and the context route extends an existing owner: verified.
- The file map of the smallest restoration, including the owner module of the private marker and the cut-label check that reads it: verified (
privateAttributes/tooltipDescription.stylex.ts,Text/cutText.tsx:88-101). - The pattern rows for the copy have conforming and violating fixtures, and the Astryx binding declares that it describes with a copy: verified (
tooltip.ts,tooltip.fixtures.ts,Tooltip.a11y.states.ts). - The named tests and specs exist and assert what the description says: verified by reading; their CI jobs were still running at this review.
- The browser and screen-reader observations: stated in text for earlier revisions, not rechecked.
- The unit suites, typecheck, pattern tests, knowledge and changeset checks and the boundary check pass: stated for earlier revisions; at this revision CI's changeset-coverage and import-boundary steps pass, and its lint fails on the comment-provenance baseline.
- The notes on earlier revisions (main merges, preflight fixes, review fixes, no-description paths): verified against the code at this revision.
- Changeset: the layer mounts at the first hover, focus or tap, a hidden copy describes the trigger until then, server and hydration timing follow the trigger kind, component content runs its effects from mount, and the
describedBymeaning and the toggle recipe change: verified.
Files:
packages/core/src/Button/Button.tsx: drops cited comment sites that the comment-provenance baseline still lists (blocking, above)packages/core/src/InputGroup/groupStyles.ts: drops a cited comment site that the comment-provenance baseline still lists (blocking, above)internal/test-utils/src/setup.ts: optional: finds the copy by its id suffixpackages/core/src/__tests__/tooltipDescription.ts: optional: finds the copy by its id suffixpackages/core/src/Avatar/Avatar.test.tsx: optional: reads a copy that nothing references- Clear,
.changeset/:tooltip-layer-mounts-on-first-show.md - Clear,
.github/scripts/lib/:a11y-spec-files.mjs,a11y-spec-files.test.mjs - Clear,
apps/docsite/e2e/:changelog.spec.ts,docs-hydration.spec.ts,home-late-script.spec.ts,liveTooltips.ts - Clear,
apps/storybook/stories/:ButtonGroupCornersA11y.stories.tsx,Tooltip.stories.tsx,TooltipA11y.stories.tsx,TooltipDecorator.stories.tsx,TooltipDescriptionA11y.stories.tsx - Clear,
docs/specs/components/Tooltip/:Tooltip.spec.md - Clear,
internal/a11y-spec/src/patterns/:tooltip.fixtures.ts,tooltip.ts - Clear,
packages/cli/:api/template/use-truncation-hook-usage.test.tsx,api/theme-edit/theme-part-counts-reached-fill.test.mjs - Clear,
packages/core/src/:Banner/Banner.test.tsx,Button/Button.test.tsx,Button/Button.truncationTooltip.test.tsx,ButtonGroup/ButtonGroup.test.tsx,ButtonGroup/__tests__/ButtonGroupCorners.interaction.browser.spec.ts,CheckboxInput/CheckboxInput.test.tsx,CheckboxInput/CheckboxInput.tsx,CheckboxList/CheckboxList.test.tsx,CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts,CodeBlock/CodeBlock.test.tsx,ComplexSelector/ComplexSelector.test.tsx,DateInput/DateInput.test.tsx,DateInput/DateInput.tsx,DateRangeInput/DateRangeInput.test.tsx,DateRangeInput/DateRangeInput.tsx,DateTimeInput/DateTimeInput.test.tsx,DateTimeInput/DateTimeInput.tsx,DateTimeInput/DateTimeInputTouch.test.tsx,Field/InputClearButton.test.tsx,FileInput/FileInput.test.tsx,InfoTip/InfoTip.pin.test.tsx,InfoTip/InfoTip.test.tsx,InfoTip/InfoTip.tsx,InfoTip/__tests__/InfoTipAudit.a11y.chromium.spec.ts,Layer/__tests__/LayerEntranceSide.interaction.browser.spec.ts,Layer/touchTriggerTargets.test.tsx,Layer/useLayer.tsx,Link/Link.test.tsx,MultiSelector/MultiSelector.test.tsx,MultiSelector/MultiSelector.tsx,NumberInput/NumberInput.test.tsx,Pagination/Pagination.test.tsx,PowerSearch/PowerSearch.statusTooltip.test.tsx,PowerSearch/PowerSearch.test.tsx,RadioList/RadioList.test.tsx,SegmentedControl/SegmentedControl.test.tsx,Selector/Selector.test.tsx,Selector/Selector.tsx,SideNav/SideNav.test.tsx,Slider/Slider.test.tsx,Slider/Slider.tsx,Switch/Switch.test.tsx,Switch/Switch.tsx,TabList/__tests__/TabDescription.test.tsx,Text/Text.test.tsx,Text/cutText.tsx,TextArea/TextArea.test.tsx,TextInput/TextInput.test.tsx,TimeInput/NativeTimeInput.test.tsx,TimeInput/TimeInput.test.tsx,Timestamp/Timestamp.test.tsx,Tokenizer/Tokenizer.statusTooltip.test.tsx,Tokenizer/Tokenizer.test.tsx,Tokenizer/TokenizerBottomSheet.test.tsx,Toolbar/Toolbar.test.tsx,Tooltip/Tooltip.ssr.test.tsx,Tooltip/Tooltip.test.tsx,Tooltip/Tooltip.tsx,Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts,Tooltip/__tests__/Tooltip.a11y.states.ts,Tooltip/__tests__/Tooltip.a11y.test.tsx,Tooltip/__tests__/TooltipDecorator.a11y.browser.spec.ts,Tooltip/__tests__/TooltipDescription.a11y.browser.spec.ts,Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts,Tooltip/tooltipPresentInterest.ts,Tooltip/useTooltip.doc.mjs,Tooltip/useTooltip.test.tsx,Tooltip/useTooltip.tsx,Typeahead/Typeahead.statusTooltip.test.tsx,Typeahead/Typeahead.test.tsx,hooks/useInputStatusIcon.test.tsx,hooks/useInputStatusIcon.tsx,privateAttributes/tooltipDescription.stylex.ts,utils/sharedRealm.ts - Clear,
packages/lab/src/:ListInput/ListInput.test.tsx - Clear,
packages/richtext/src/:RichTextEditor.portalHost.test.tsx,RichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,internal/CodeBlockHeaderPlugin.test.tsx
…tations this PR removed
|
/approve-spec 9b9f6ae |
There was a problem hiding this comment.
Approved. CI ran on this revision once it was marked ready for review, and every check passes, the required test, build, docsite-test and lint included.
The Tooltip record changes carry an engineering owner's approval for this revision, and the code is unchanged since the last review. Two optional notes stay open on their earlier threads: the copy's id-suffix test selectors and Avatar's unreferenced copy.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
Claims:
- The lint baseline update drops exactly the comment citations this pull request removed from the Button and InputGroup group styles: verified (the rule's findings for both files equal the new baseline entries, and the
lintcheck passes on this revision). - A page of closed tooltips mounts no layer; the layer mounts at the first hover, focus, tap,
isOpenorshow(), in that commit, and then stays: verified (useTooltip.tsx:413-414;Tooltip.test.tsx"Tooltip layer mounts at its first show"). - Hover, keyboard focus and tap open the tooltip exactly as before: verified in the code (the hover, focus and tap handlers are unchanged by this pull request), and every hover test sends the arrival's move.
- The freeze reported in an outside app's table, the first-load size table and the benchmark: the author's measurements, not rechecked.
- Until the first show the trigger names a hidden copy after it, never inside it; in the commit that mounts the layer the copy is removed and the content takes the same id; the copy returns if the layer unmounts: verified (
useTooltip.tsx:1193-1211,Layer/useLayer.tsx:1194-1227; the renders-once case inTooltip.test.tsx). - Hook-built tooltips and a plain-text
Tooltipname the copy in server HTML, while an element child oranchorReftrigger names it after hydration: verified (Tooltip.ssr.test.tsx; the attach wiring inTooltip.tsx). - Plain text becomes one string through the shared
getNodeText, which joins block lines with a space: verified (useTooltip.tsx,utils/getNodeText.ts). - Component content renders as it is into a copy that starts empty in server markup and is filled through a portal, so its effects run before the first show, as the changeset and the
contentJSDoc say: verified (useTooltip.tsx:303-338;Tooltip.tsxcontentJSDoc). - Once mounted, a describing tooltip's content is not
aria-hidden; a cut-label tooltip keeps itaria-hiddenunless pinned, returns an emptydescribedBy, renders no copy and gives its content no id: verified (useTooltip.tsx:1193,:1198,:1268;Tooltip.tsxUndescribedTooltip). - A Button tooltip that repeats the name gets no copy and no
aria-describedby, and once shown its content keeps an id and is notaria-hidden, as onmain: verified (Button.tsx:1161-1166). - The no-description and description-id contexts and the tooltip-id helper live in the existing internal trigger contract, and no package entry exports them: verified (
tooltipPresentInterest.ts:49-90; Core's export map). - Text's and Heading's truncation tooltips render under the no-description context: verified (
Tooltip.tsx:394-401,UndescribedTooltip). - Group trailing corners skip only the copy, by its private marker, and a caller's own hidden follower still counts as a member: verified (
privateAttributes/tooltipDescription.stylex.ts:42-43;ButtonGroup.test.tsx; the corners story). - The trailing-edge styles moved whole with last-wins order unchanged, and the InputGroup addon rule matches the same elements: verified (
Button.tsx:919-963,InputGroup/groupStyles.ts:81-89). describedBynow names the description, and the JSDoc, doc file and changeset say so; the toggle recipe needs onlyaria-describedbyandaria-expanded; InfoTip and Slider find the tooltip through a private helper: verified (useTooltip.tsx:1268,useTooltip.doc.mjs,InfoTip.tsx:205,Slider.tsx:716-719).- CheckboxInput's reason is the tooltip's own description under the id the input already names, and renders once: verified (
CheckboxInput.tsx:663-669; the reason-once test). - The record changes FR2, FR10, FR12, AR1, PR2 and the ownership line, and the context route extends an existing owner: verified.
- The file map of the smallest restoration, including the owner module of the private marker and the cut-label check that reads it: verified (
privateAttributes/tooltipDescription.stylex.ts,Text/cutText.tsx:88-101). - The pattern rows for the copy have conforming and violating fixtures, and the Astryx binding declares that it describes with a copy: verified (
tooltip.ts,tooltip.fixtures.ts,Tooltip.a11y.states.ts). - The named tests and specs exist and assert what the description says: verified by reading, and CI on this revision runs them and they pass.
- The browser observations: CI on this revision passes the browser specs in Chromium, WebKit and Firefox, the new description spec in Chromium and Firefox; the screen-reader observations are stated in text for earlier revisions, not rechecked.
- The unit suites, typecheck, pattern tests, knowledge and changeset checks and the boundary check pass: verified for this revision by CI, whose
test,build,typecheck,lintanddocsite-testchecks pass. - The notes on earlier revisions (main merges, preflight fixes, review fixes, no-description paths): verified against the code at this revision.
- Changeset: the layer mounts at the first hover, focus or tap, a hidden copy describes the trigger until then, server and hydration timing follow the trigger kind, component content runs its effects from mount, and the
describedBymeaning and the toggle recipe change: verified.
Files (results carried from the review of this same revision, whose code is unchanged; the product source files were reread):
internal/eslint-plugin-astryx/no-comment-provenance.baseline.json: clear (matches the comment sites the edited files still carry)packages/core/src/Button/Button.tsx,packages/core/src/InputGroup/groupStyles.ts: clear (their dropped citations are out of the baseline)internal/test-utils/src/setup.ts: optional: finds the copy by its id suffixpackages/core/src/__tests__/tooltipDescription.ts: optional: finds the copy by its id suffixpackages/core/src/Avatar/Avatar.test.tsx: optional: reads a copy that nothing references- Clear,
.changeset/:tooltip-layer-mounts-on-first-show.md - Clear,
.github/scripts/lib/:a11y-spec-files.mjs,a11y-spec-files.test.mjs - Clear,
apps/docsite/e2e/:changelog.spec.ts,docs-hydration.spec.ts,home-late-script.spec.ts,liveTooltips.ts - Clear,
apps/storybook/stories/:ButtonGroupCornersA11y.stories.tsx,Tooltip.stories.tsx,TooltipA11y.stories.tsx,TooltipDecorator.stories.tsx,TooltipDescriptionA11y.stories.tsx - Clear,
docs/specs/components/Tooltip/:Tooltip.spec.md - Clear,
internal/a11y-spec/src/patterns/:tooltip.fixtures.ts,tooltip.ts - Clear,
packages/cli/:api/template/use-truncation-hook-usage.test.tsx,api/theme-edit/theme-part-counts-reached-fill.test.mjs - Clear,
packages/core/src/:Banner/Banner.test.tsx,Button/Button.test.tsx,Button/Button.truncationTooltip.test.tsx,ButtonGroup/ButtonGroup.test.tsx,ButtonGroup/__tests__/ButtonGroupCorners.interaction.browser.spec.ts,CheckboxInput/CheckboxInput.test.tsx,CheckboxInput/CheckboxInput.tsx,CheckboxList/CheckboxList.test.tsx,CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts,CodeBlock/CodeBlock.test.tsx,ComplexSelector/ComplexSelector.test.tsx,DateInput/DateInput.test.tsx,DateInput/DateInput.tsx,DateRangeInput/DateRangeInput.test.tsx,DateRangeInput/DateRangeInput.tsx,DateTimeInput/DateTimeInput.test.tsx,DateTimeInput/DateTimeInput.tsx,DateTimeInput/DateTimeInputTouch.test.tsx,Field/InputClearButton.test.tsx,FileInput/FileInput.test.tsx,InfoTip/InfoTip.pin.test.tsx,InfoTip/InfoTip.test.tsx,InfoTip/InfoTip.tsx,InfoTip/__tests__/InfoTipAudit.a11y.chromium.spec.ts,Layer/__tests__/LayerEntranceSide.interaction.browser.spec.ts,Layer/touchTriggerTargets.test.tsx,Layer/useLayer.tsx,Link/Link.test.tsx,MultiSelector/MultiSelector.test.tsx,MultiSelector/MultiSelector.tsx,NumberInput/NumberInput.test.tsx,Pagination/Pagination.test.tsx,PowerSearch/PowerSearch.statusTooltip.test.tsx,PowerSearch/PowerSearch.test.tsx,RadioList/RadioList.test.tsx,SegmentedControl/SegmentedControl.test.tsx,Selector/Selector.test.tsx,Selector/Selector.tsx,SideNav/SideNav.test.tsx,Slider/Slider.test.tsx,Slider/Slider.tsx,Switch/Switch.test.tsx,Switch/Switch.tsx,TabList/__tests__/TabDescription.test.tsx,Text/Text.test.tsx,Text/cutText.tsx,TextArea/TextArea.test.tsx,TextInput/TextInput.test.tsx,TimeInput/NativeTimeInput.test.tsx,TimeInput/TimeInput.test.tsx,Timestamp/Timestamp.test.tsx,Tokenizer/Tokenizer.statusTooltip.test.tsx,Tokenizer/Tokenizer.test.tsx,Tokenizer/TokenizerBottomSheet.test.tsx,Toolbar/Toolbar.test.tsx,Tooltip/Tooltip.ssr.test.tsx,Tooltip/Tooltip.test.tsx,Tooltip/Tooltip.tsx,Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts,Tooltip/__tests__/Tooltip.a11y.states.ts,Tooltip/__tests__/Tooltip.a11y.test.tsx,Tooltip/__tests__/TooltipDecorator.a11y.browser.spec.ts,Tooltip/__tests__/TooltipDescription.a11y.browser.spec.ts,Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts,Tooltip/tooltipPresentInterest.ts,Tooltip/useTooltip.doc.mjs,Tooltip/useTooltip.test.tsx,Tooltip/useTooltip.tsx,Typeahead/Typeahead.statusTooltip.test.tsx,Typeahead/Typeahead.test.tsx,hooks/useInputStatusIcon.test.tsx,hooks/useInputStatusIcon.tsx,privateAttributes/tooltipDescription.stylex.ts,utils/sharedRealm.ts - Clear,
packages/lab/src/:ListInput/ListInput.test.tsx - Clear,
packages/richtext/src/:RichTextEditor.portalHost.test.tsx,RichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,internal/CodeBlockHeaderPlugin.test.tsx
|
/approve-spec 7626829 |
There was a problem hiding this comment.
Approved pending CI: CI passed every check on this revision, the required test, build, docsite-test and lint checks included. A re-run of the CI workflow started since is still running, and the merge guard waits for its required checks.
The Tooltip record changes (FR2, FR10, FR12, AR1 and PR2) carry an engineering owner's approval for this revision, and no blocking finding remains. Two optional notes stay open on their earlier threads: the copy's id-suffix test selectors and Avatar's unreferenced copy.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
Claims:
- A page of closed tooltips mounts no layer; the layer mounts at the first hover, focus, tap,
isOpenorshow(), in that commit, and then stays: verified (useTooltip.tsx:413-414;Tooltip.test.tsx"Tooltip layer mounts at its first show"). - Hover, keyboard focus and tap open the tooltip exactly as before: verified in the code (the hover, focus and tap handlers are unchanged by this pull request), and every hover test sends the arrival's move.
- The freeze reported in an outside app's table, the first-load size table and the benchmark: the author's measurements, not rechecked.
- The description is in the accessibility tree from the first markup, once, before and after the tooltip shows: verified (the renders-once case in
Tooltip.test.tsx;TooltipDescription.a11y.browser.spec.ts). - Until the first show the trigger names a hidden copy after it, never inside it; in the commit that mounts the layer the copy is removed and the content takes the same id; the copy returns if the layer unmounts: verified (
useTooltip.tsx:1189-1211,Layer/useLayer.tsx:1214-1226). - Hook-built tooltips and a plain-text
Tooltipname the copy in server HTML, while an element child oranchorReftrigger names it after hydration: verified (Tooltip.ssr.test.tsx; the attach wiring inTooltip.tsx). - Plain text becomes one string through the shared
getNodeText, which joins block lines with a space: verified (useTooltip.tsx,utils/getNodeText.ts). - Component content renders as it is into a copy that starts empty in server markup and is filled through a portal, so its effects run before the first show, as the changeset and the
contentJSDoc say: verified (useTooltip.tsx:303-338;Tooltip.tsxcontentJSDoc). - The earlier post-hydration portal copy and the layer runtime's extra mount store are gone: verified (
useTooltip.tsx,CheckboxInput.tsx). - Once mounted, a describing tooltip's content is not
aria-hidden; a cut-label tooltip keeps itaria-hiddenunless pinned, returns an emptydescribedBy, renders no copy and gives its content no id: verified (useTooltip.tsx:1193,:1198,:1268;Tooltip.tsx:394-401). - A Button tooltip that repeats the name gets no copy and no
aria-describedby, and once shown its content keeps an id and is notaria-hidden, as onmain: verified (Button.tsx:1161-1166). - The no-description and description-id contexts and the tooltip-id helper live in the existing internal trigger contract, and no package entry exports them: verified (
tooltipPresentInterest.ts:49-90; Core's export map). - Text's and Heading's truncation tooltips render under the no-description context: verified (
Tooltip.tsx:394-401,UndescribedTooltip). - Group trailing corners skip only the copy, by its private marker, and a caller's own hidden follower still counts as a member: verified (
privateAttributes/tooltipDescription.stylex.ts:42-43;ButtonGroup.test.tsx; the corners story). - The trailing-edge styles moved whole with last-wins order unchanged, and the InputGroup addon rule matches the same elements: verified (
Button.tsx:919-963,InputGroup/groupStyles.ts:81-89). describedBynow names the description, and the JSDoc, doc file and changeset say so; the toggle recipe needs onlyaria-describedbyandaria-expanded; InfoTip and Slider find the tooltip through a private helper: verified (useTooltip.tsx:1268,useTooltip.doc.mjs,InfoTip.tsx:205,Slider.tsx:716-719).- CheckboxInput's reason is the tooltip's own description under the id the input already names, and renders once: verified (
CheckboxInput.tsx:662-670; the reason-once test). - The record changes FR2, FR10, FR12, AR1, PR2 and the ownership line, and the context route extends an existing owner: verified.
- The file map of the smallest restoration, including the owner module of the private marker and the cut-label check that reads it: verified (
privateAttributes/tooltipDescription.stylex.ts,Text/cutText.tsx:88-101). - The pattern rows for the copy have conforming and violating fixtures, and the Astryx binding declares that it describes with a copy: verified (
tooltip.ts,tooltip.fixtures.ts,Tooltip.a11y.states.ts:44). - The named tests and specs exist and assert what the description says: verified by reading; CI's first run on this revision passed them.
- The browser observations in Chromium, WebKit and Firefox and the screen-reader observations: stated in text for earlier revisions, not rechecked.
- Typecheck, lint, the build, the node and UI test shards and the Chromium, WebKit and Firefox browser suites pass: verified in CI's first run on this revision; a re-run is in progress.
- The notes on earlier revisions (main merges, preflight fixes, review fixes, no-description paths, the status-tooltip suites from
main): verified against the code at this revision. - Changeset: the layer mounts at the first hover, focus or tap, a hidden copy describes the trigger until then, server and hydration timing follow the trigger kind, component content runs its effects from mount, and the
describedBymeaning and the toggle recipe change: verified.
Files:
internal/eslint-plugin-astryx/no-comment-provenance.baseline.json: clear (lists exactly the comment sites the edited files still carry)internal/test-utils/src/setup.ts: optional: finds the copy by its id suffixpackages/core/src/__tests__/tooltipDescription.ts: optional: finds the copy by its id suffixpackages/core/src/Avatar/Avatar.test.tsx: optional: reads a copy that nothing references- Clear,
.changeset/:tooltip-layer-mounts-on-first-show.md - Clear,
.github/scripts/lib/:a11y-spec-files.mjs,a11y-spec-files.test.mjs - Clear,
apps/docsite/e2e/:changelog.spec.ts,docs-hydration.spec.ts,home-late-script.spec.ts,liveTooltips.ts - Clear,
apps/storybook/stories/:ButtonGroupCornersA11y.stories.tsx,Tooltip.stories.tsx,TooltipA11y.stories.tsx,TooltipDecorator.stories.tsx,TooltipDescriptionA11y.stories.tsx - Clear,
docs/specs/components/Tooltip/:Tooltip.spec.md - Clear,
internal/a11y-spec/src/patterns/:tooltip.fixtures.ts,tooltip.ts - Clear,
packages/cli/:api/template/use-truncation-hook-usage.test.tsx,api/theme-edit/theme-part-counts-reached-fill.test.mjs - Clear,
packages/core/src/:Banner/Banner.test.tsx,Button/Button.test.tsx,Button/Button.truncationTooltip.test.tsx,Button/Button.tsx,ButtonGroup/ButtonGroup.test.tsx,ButtonGroup/__tests__/ButtonGroupCorners.interaction.browser.spec.ts,CheckboxInput/CheckboxInput.test.tsx,CheckboxInput/CheckboxInput.tsx,CheckboxList/CheckboxList.test.tsx,CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts,CodeBlock/CodeBlock.test.tsx,ComplexSelector/ComplexSelector.test.tsx,DateInput/DateInput.test.tsx,DateInput/DateInput.tsx,DateRangeInput/DateRangeInput.test.tsx,DateRangeInput/DateRangeInput.tsx,DateTimeInput/DateTimeInput.test.tsx,DateTimeInput/DateTimeInput.tsx,DateTimeInput/DateTimeInputTouch.test.tsx,Field/InputClearButton.test.tsx,FileInput/FileInput.test.tsx,InfoTip/InfoTip.pin.test.tsx,InfoTip/InfoTip.test.tsx,InfoTip/InfoTip.tsx,InfoTip/__tests__/InfoTipAudit.a11y.chromium.spec.ts,InputGroup/groupStyles.ts,Layer/__tests__/LayerEntranceSide.interaction.browser.spec.ts,Layer/touchTriggerTargets.test.tsx,Layer/useLayer.tsx,Link/Link.test.tsx,MultiSelector/MultiSelector.test.tsx,MultiSelector/MultiSelector.tsx,NumberInput/NumberInput.test.tsx,Pagination/Pagination.test.tsx,PowerSearch/PowerSearch.statusTooltip.test.tsx,PowerSearch/PowerSearch.test.tsx,RadioList/RadioList.test.tsx,SegmentedControl/SegmentedControl.test.tsx,Selector/Selector.test.tsx,Selector/Selector.tsx,SideNav/SideNav.test.tsx,Slider/Slider.test.tsx,Slider/Slider.tsx,Switch/Switch.test.tsx,Switch/Switch.tsx,TabList/__tests__/TabDescription.test.tsx,Text/Text.test.tsx,Text/cutText.tsx,TextArea/TextArea.test.tsx,TextInput/TextInput.test.tsx,TimeInput/NativeTimeInput.test.tsx,TimeInput/TimeInput.test.tsx,Timestamp/Timestamp.test.tsx,Tokenizer/Tokenizer.statusTooltip.test.tsx,Tokenizer/Tokenizer.test.tsx,Tokenizer/TokenizerBottomSheet.test.tsx,Toolbar/Toolbar.test.tsx,Tooltip/Tooltip.ssr.test.tsx,Tooltip/Tooltip.test.tsx,Tooltip/Tooltip.tsx,Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts,Tooltip/__tests__/Tooltip.a11y.states.ts,Tooltip/__tests__/Tooltip.a11y.test.tsx,Tooltip/__tests__/TooltipDecorator.a11y.browser.spec.ts,Tooltip/__tests__/TooltipDescription.a11y.browser.spec.ts,Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts,Tooltip/tooltipPresentInterest.ts,Tooltip/useTooltip.doc.mjs,Tooltip/useTooltip.test.tsx,Tooltip/useTooltip.tsx,Typeahead/Typeahead.statusTooltip.test.tsx,Typeahead/Typeahead.test.tsx,hooks/useInputStatusIcon.test.tsx,hooks/useInputStatusIcon.tsx,privateAttributes/tooltipDescription.stylex.ts,utils/sharedRealm.ts - Clear,
packages/lab/src/:ListInput/ListInput.test.tsx - Clear,
packages/richtext/src/:RichTextEditor.portalHost.test.tsx,RichTextEditor.test.tsx,RichTextEditorToolbarLink.test.tsx,internal/CodeBlockHeaderPlugin.test.tsx
…ry owed audit, and deferrals name audits-at-head (#13722) * ci(a11y): a first run takes a fourth audit leg when that finishes every owed audit A first run that could not fit every owed dependent audit into three legs deferred the rest to a full re-run of all jobs at the same head. On #11916 that re-ran 63 jobs (about 383 runner-minutes) twice for 3 audits of 261 s. The planner now takes a fourth leg when every owed audit then fits the leg budget, and still defers when it does not. Its deferral notice and summary now point at the audits-at-head dispatch for that head, with the exact command, instead of a re-run of all jobs: it runs only the owed audits there, and merge-guard accepts its record. AST-030 FR12 says so. * docs(AST-030): DEC-25 records the fourth first-run audit leg Specs: FR12 and its decision agree. * docs(AST-030): FR12's shared-primitive clause and planning row allow the fourth first-run leg CodeBunny review: two FR12 places still capped a first run at three legs. The planner's JSDoc names the fourth leg, and a rewrapped ci.yml comment fits the line length. * ci(a11y): the deferral notice says which audits did not run and why CodeBunny review: the count names the deferred files, while the four-leg test is on every owed audit, so 'N files do not fit four legs' could read as false.
User impact
A page with a tooltip on every row froze while it rendered. This includes a table whose cells use
Tooltip, anIconButtonwith atooltip, or anAvatar. In one app, a 100-row table with about five tooltips per row froze for 13 s. The cause: every tooltip mounted its closed layer together with its trigger.Now a tooltip mounts its layer at its first show, so a page of closed tooltips mounts no layer. Hover, keyboard focus and tap open the tooltip exactly as before.
The trigger's description is in the accessibility tree from the first markup, once, before and after the tooltip shows. VoiceOver on iOS and TalkBack were observed reading it (below).
useTooltip(Button,IconButton,InfoTip,Avatar, field reasons and status icons, and others), and aTooltiparound plain text, name the description there. Onmainthe tooltip exists only after hydration.Tooltiparound an element, or withanchorRef, names it once the page hydrates. That includes the tooltips ofLink,StatusDot,Thumbnail,Tablerow status andSideNavHeading.Problem and solution fit
useTooltipmounted its layer eagerly with the trigger. So the page paid for every closed layer at mount, once per tooltip.useTooltipuses the layer runtime's existinglazyMountwithkeepsMountAfterShow, asContextMenudoes. The layer mounts at the first hover, focus, tap,isOpenorshow(), in the same commit as that show, and then stays mounted.renderTooltiprenders a hidden copy of the tooltip text next to the trigger:<span hidden id="…-description">. It is a sibling after the trigger, never inside it. In the commit that mounts the layer, the copy is removed and the layer's content takes the same id, soaria-describedbynames the tooltip's content from then on and the text renders once (architecture:component-style-authoringINV7). If the layer unmounts again, the copy returns in that commit. The layer runtime renders the copy in the same component as the layer (useLayerInternal's internalwhileUnmountedrender prop), so both change in one commit.aria-describedbynames it from the first render, and the id never changes.aria-describedbyreads a hidden node that it names directly, and browse mode skips that node.aria-hidden: it is the one element that holds the text, and the trigger's description. A cut-label tooltip, which has no description, keeps its contentaria-hiddenunless a pin (show()) shows it (AR1). A Button tooltip that repeats the Button's name gets noaria-describedbyfrom Button and no hidden copy; once shown, its content keeps its id and is notaria-hidden, as onmain.getNodeText, which joins block lines with a space.contentJSDoc say so. Host markup stays flattened text.useLayerInternalmount store are gone.UndescribedTooltip: Button's cut label,TableHeaderCell).Both render no copy and no
aria-describedby. They use an internalTooltipDescribesContext, added to the existing trigger contractTooltip/tooltipPresentInterest.ts. The context is not exported from any package entry. Text's and Heading'sUndescribedTooltip(from fix(Text, Heading): the truncation tooltip adds no description, so the cut text is read once #12653, now on main) renders underTooltipDescribesContextfalsetoo.:nth-last-child(1 of S)) now also skips the tooltip copy only, by its own private marker::not([data-astryx-tooltip-description]). A caller's own hidden follower still counts as a member (ButtonGroup FR3), even one whose id ends in-description. So a tooltip'd last member keeps its rounded trailing corners.describedBymeaning.useTooltip'sdescribedByis now the id of the description (the hidden copy before the first show, the tooltip's content after it), not the tooltip element's id.getElementById(describedBy)now gets the copy before the first show and the tooltip's content after it. The JSDoc, the doc file and the changeset say this.show()toggle recipe now needs onlyaria-describedbyandaria-expanded. FR10 is amended to match (the Specification session's ruling); InfoTip keeps its ownaria-controlsunder its own record.aria-controlsand Slider's touch controller find the tooltip through a private helper (tooltipIdOf), which is not exported from the package.aria-describedbyalready names (an internalTooltipDescriptionIdContextinTooltip/tooltipPresentInterest.ts, not exported). So the reason is a hidden copy until the tooltip first shows, then the tooltip's text, and renders once.Expected behavior and authority
component:TooltipFR3–FR5 (hover, focus and tap open the tooltip) are unchanged.aria-describedbynames a hidden copy of its text rendered with the trigger in server and client markup; once mounted, it names the tooltip's content and the copy is removed, so the text renders once." A truncation tooltip adds no description.useTooltipcaller name the copy in server markup. Its Implementation gap covers an element child oranchorReftarget (wired on the client) and component content (empty in server markup).aria-controlsfrom the pinning button.describedByandaria-expanded.architecture:component-import-boundariesINV3: every ARIA reference names an element in the document, and a description that a surface supplies is in the base markup before the surface exists.Tooltip/tooltipPresentInterestper Specs (S&D). It is an extension of an existing owner (react-component-runtime INV16), not a new module.Smallest restoration
Tooltip/useTooltip.tsx:TooltipDescriptionhidden span;aria-hiddenonly when the tooltip does not describe, unless pinned);describedBy;Tooltip/tooltipPresentInterest.ts:TooltipDescribesContext(internal) and the privatetooltipIdOfhelper with the id suffix.Tooltip/Tooltip.tsx:UndescribedTooltipprovidesfalse;aria-describedbymerges each id once, and is removed when no id is left.Button/Button.tsx:false;privateAttributes/tooltipDescription.stylex.ts(groupEndStyles), each set right after the style it came from, so last-wins order is unchanged.Text/cutText.tsx: the caller-tooltip check (hasCallerTooltip) knows the copy, by its private marker (isTooltipDescriptionin the owner module), and a mounted tooltip's content. A caller's own hidden element whose id ends in-descriptionis not a tooltip copy, so a cut Button label it describes still shows its tooltip on keyboard focus (Button FR18).InputGroup/groupStyles.ts: the trailing-edge properties ofinGroupandbuttonAddonmove the same way;groupStyleskeeps its keys, each now its base style followed by itsgroupEndStylesentry. The addon's rule names:where(.astryx-input-group > *)instead of the member marker: Button sets that style only together with the marker, so it matches the same elements.privateAttributes/tooltipDescription.stylex.ts(new): the owner module of the privatedata-astryx-tooltip-descriptionattribute (architecture:public-component-apiINV23).useTooltipmarks both forms of the hidden copy with it.CheckboxInput.tsx: the reason is the tooltip's own description, under the input's existing id (TooltipDescriptionIdContext).InfoTip.tsx,Slider.tsx:tooltipIdOf.internal/a11y-specTOOLTIP_PATTERN:tooltip.trigger.described-by-copyandtooltip.trigger.description-from-copy(the description is read exactly once). They have conforming and violating fixtures. The Astryx binding declaresdescribesWithCopy.docs/specs/components/Tooltip/Tooltip.spec.md: FR2, FR12, AR1, PR2 and the ownership line.useTooltipdoc file, and a[perf]changeset.Evidence
Unit tests
Tooltip.test.tsx, "Tooltip layer mounts at its first show":role="tooltip". Each trigger names its hidden copy, which follows the trigger and is not inside it.aria-describedbynames it. CheckboxInput's "renders the reason once before and after its tooltip first shows" checks the same for a disabled reason. Both are red at 2148c7b (2 elements once shown) and green here.Tooltip.ssr.test.tsx:renderToStringmarkup names the copy, after the trigger, with the content's text and norole="tooltip".No description on the truncation and FR12 paths
Button.truncationTooltip.test.tsx: a cut label renders no copy and noaria-describedby, and the accessible description is empty.Button.test.tsx: an icon-only tooltip that repeats the name renders no copy. One that adds to the name is described by its copy, with no layer before the first show.Group corners
ButtonGroup.test.tsx: the compiled trailing selector (Button.tsx plus the owner module) skips the tooltip copy by its marker only, never by an id suffix. A tooltip'd trailing Button is followed by its copy and is still the last member.-descriptionafter the last member (ButtonGroup and InputGroup): it still counts, so the trailing corners stay as on main.Checks that read a closed tooltip's layer
aria-describedbywith thearia-controlsid plus-description; the CheckboxList audit accepts a described element inside the open tooltip; the TooltipDecorator story's play function finds the open layer around the described content.docs-hydration,changelog,home-late-script) wait for a tooltip to open on a hover (e2e/liveTooltips.ts, hovering a named control: a heading's Copy link, the changelog's next-page control, the header's Search or menu button), since a closed tooltip has no layer before its first show, in server markup or after hydration.First-load JavaScript
pnpm size:pages --base 8ef2015b(#12376's head), gzip:This is default behavior (INV10 DEC-5), so it is reported only.
1,000-CheckboxInput benchmark: net-neutral
Chromium headless at 6× CPU, production builds, 1 warm-up and 7 rounds in rotating order. Medians, this head against #12376's head 9ae1d5c:
role="tooltip"elements and hidden copies (0), and elements after mount (11,008).main, this change is +4 ms on the long-task total and +5 ms on the first render, inside the spread.Accessibility-tree and browser evidence (AST-009 FR19)
tooltip.trigger.described-by-copyandtooltip.trigger.description-from-copyrows ofTooltip.a11y.chromium.spec.tsread the real accessibility tree. The description equals the hidden copy's text, exactly once, both before the first show and after the tooltip has shown.TooltipDescription.a11y.browser.spec.ts(Chromium and WebKit) checks each path:hiddencopy: not a tooltip, not inside the trigger, text equal to the tooltip textTooltipDescription.a11y.browser.spec.tsis red at 2148c7b and green hereScreen readers
hiddenspan, and the shown text isaria-hidden. TalkBack at 29b6c00 reads the reason once on focus and finds no trailing text in reading order ("No next focusable item").Other test updates
Tests that read the tooltip before it ever opened now do one of these:
tooltipTextOnHoverwhen the tooltip repeats the name.The test setup's text queries skip the hidden copy, as they skip live regions. Each test keeps its outcome.
The earlier head regressed two browser specs (
TooltipDecorator.a11y.browser.spec.ts, 3 cases, andTooltipFocusReturn.a11y.chromium.spec.ts, 2 cases): at d27303d they failed in Chromium, and they pass onmain. The tooltip itself still showed: a debug run hovered the decorator control and found its surface open. The specs looked the tooltip up the way the old markup drew it. The specs now look up tooltips withincludeHidden, so they also count a layer that stays mounted, hidden, after its first show. The description id is the layer's id plus-description: the hidden copy before the first show, then the content inside the layer. At this head both specs read the tooltip that way, as this PR's other tests already do, and pass (6 of 6). What they check is unchanged: the decorator controls' tooltips show and unmount cleanly, and focus that comes back after Escape re-shows the tooltip. A red check holds: with the tooltip's layer show stubbed to do nothing, the updated specs fail 5 of 6. The one that passes expects no tooltip.Main merge (85eddd8):
Tooltip.spec.mdwas merged row by row. FR2, FR10 and FR12 keep this PR's text, and FR4 takesmain's, which drops the implementation gap fix(Tooltip): script focus after a pointer press opens no tooltip on a non-text trigger #11782 fixed. Three status-tooltip suites added onmain(PowerSearch, Tokenizer, Typeahead) read the description copy at rest and the surface after it shows, like this PR's older test changes (29/29).Preflight fixes (fa8ead0):
useSyncExternalStore), not React state, so no DOM node is in state (architecture:react-component-runtimeINV1).tooltipIdOfand the id suffix live inTooltip/tooltipPresentInterest.tsbeside the other internal trigger contracts; InfoTip and Slider import it from there.isTooltipDescriptionlives in the marker's owner module,privateAttributes/tooltipDescription.stylex.ts, andText/cutText.tsximports it from there. Before, Button importedisTooltipDescriptionfromuseTooltip, soastryx swizzle Buttoncopied the whole tooltip, layer and motion runtime (about 100 internal files) instead of using the public Tooltip export; the swizzle import test caught it.useTruncationtemplate test skips the tooltip's hidden description copies when it counts a cell's spans. The theme editor's unreached-parts test checks that overlays come before any part of another category: among the overlays the order is the census order, and a tooltip whose layer mounts at its first show can now come after the first ten.Review fixes (78332b0):
aria-describedbynames the content inside that layer. The Button's check now accepts it, so keyboard focus opens one tooltip, not two (Button FR18). The new test "lets a caller's Tooltip that has already mounted take precedence" fails without the fix (two tooltips) and passes with it.createStorefromutils/sharedRealm.ts(the per-instance body thatsharedStorenow calls), not a copy of it.No-describe paths: a cut-label tooltip, whose hook runs under
TooltipDescribesContextfalse(UndescribedTooltip: Button's cut label, TableHeaderCell's cut heading, and Text's and Heading's truncation tooltips), returns an emptydescribedBy, renders no copy, and gives its mounted content no id. So the trigger has noaria-describedbybefore or after the layer mounts. A Button tooltip that repeats its name renders underfalsetoo, so it gets no hidden copy, and Button itself sets noaria-describedbyfor it; its hook runs above that provider, so its shown content keeps the-descriptionid, unreferenced, as onmain.Button.truncationTooltip.test.tsx"adds no description that repeats the name" andTableHeaderCell.truncationTooltip.test.tsxassert it after the tooltip shows. Text's and Heading's truncation tooltips add no description on this branch either (UndescribedTooltip, from fix(Text, Heading): the truncation tooltip adds no description, so the cut text is read once #12653);Text.test.tsxasserts noaria-describedby.Scope
Writing rubric results
Testing
vitest --project ui, in four shards, over core, lab and richtext on this head (mainand perf(CheckboxInput): the disabled-message tooltip runs only while it can show #12376 at 9ae1d5c merged): every file passes (7,654 + 2,252 + 2,937 tests in three shards, plus a fourth shard of 430 files whose five load-timeout files pass on a rerun, 392 of 392). Head a6856e9 (later heads b969727, 29b6c00 and c35c9a2 add the browser spec and the CodeBunny round-1 and round-2 fixes; the touched suites pass, 3,073 + 2,872 tests).tsc --noEmitfor@astryxdesign/coreandinternal/a11y-spec: clean.pnpm check:knowledge: aligned.pnpm check:changesets: valid.Overlap checked: #11831 (shashank03-dev;
useTooltipandTruncationTooltip; merged first, and this branch merged it: an arrival only arms the hover and the first move starts the show delay, which then mounts the layer; this PR's hover tests send that move, and a pre-show check reads the mount marker instead of atooltiprole), #12653 (truncated Text and Heading tooltips add no description; merged first, and this branch merged it: itsUndescribedTooltiprenders under this PR'sTooltipDescribesContextfalse, so it renders no copy), #12376 (CheckboxInput tooltip only when shown; merged into this branch)Owner: fix-loop lane 3 (branch kept from lane 4). Land path: Specs stamp, CodeBunny, CI, and then the drain merges after #12376.