VVitaly Rtishchev[@mantine/core] ActionBar: Use `activity` keepMountedMode by default
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mantine.dev] Clarify that tooltips must not contain interactive content (#9110) * [@mantine/core] Tooltip: Clarify that tooltips must not contain interactive content The docs, demo, and prop JSDoc added alongside the `interactive` prop (#9072) encouraged placing interactive content inside a tooltip — the docs used "for example a link", and the demo rendered an `<Anchor href>` inside the tooltip. Interactive/focusable content in a tooltip is inaccessible: the tooltip is exposed to assistive technology only as an `aria-describedby` description, is not in the focus order, and is dismissed on `Escape`, so its content cannot be reliably reached by keyboard or screen reader users. Reframe the `interactive` prop around what it is actually for: satisfying the *hoverable* condition of WCAG 1.4.13 so the pointer can reach the tooltip body without dismissing it (e.g. to read or select its content). The previous wording also misstated WCAG 1.4.13 as applying only when the tooltip contains interactive content; the criterion applies to any content shown on hover. Interactive content must be reachable by keyboard and touch, not hover alone, so it does not belong in any hover-triggered element (Tooltip or HoverCard) — it should be a Popover, the accessible non-modal dialog. - tooltip.mdx: rewrite the "Interactive tooltip" guidance and direct interactive content to Popover. - Tooltip.demo.interactive: replace the link with non-interactive hoverable text. - Tooltip.tsx: correct the `interactive` prop JSDoc. Guidance references: - WCAG 2.1 SC 1.4.13 Content on Hover or Focus: https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html - WAI-ARIA APG Tooltip pattern ("A hover that contains focusable elements can be made using a non-modal dialog"): https://www.w3.org/WAI/ARIA/apg/patterns/tooltip - Inclusive Components, Tooltips & Toggletips ("Don't put interactive content ... in tooltips or toggletips"): https://inclusive-components.design/tooltips-toggletips/ - Sarah Higley, "Tooltips in the time of WCAG 2.1" ("No interactive content"): https://sarahmhigley.com/writing/tooltips-in-wcag-21/ - CSS-Tricks, Tooltip best practices ("Tooltips must not contain interactive content"): https://css-tricks.com/tooltip-best-practices * [@mantine/core] Tooltip: Rename `interactive` prop to `hoverable` BREAKING CHANGE: the `interactive` prop introduced in 9.5.1 is renamed to `hoverable` (default still `false`). The prop keeps the tooltip open while the pointer moves onto it — it satisfies the *hoverable* condition of WCAG 1.4.13. It has nothing to do with the tooltip containing interactive content; in fact interactive content must not go in a tooltip (see the preceding guidance commit). The name `interactive` promised the opposite of what the accessibility guidance recommends, so the docs for it had to warn against interactive content — a permanent contradiction. Renaming to `hoverable` names the actual behavior and removes that contradiction. Renaming now, while adoption is minimal (shipped 8 days ago), keeps the breaking change as cheap as it will ever be. - Rename the prop, the `data-interactive` mod to `data-hoverable`, and the internal `interactiveMod` variable across Tooltip.tsx and use-tooltip.ts. - Update tests, story, the demo (file/export renamed to `hoverable`), and the Tooltip docs page (section, prose, anchor, examples). - Update the 9.5.0 changelog demo reference to the renamed export; its prose is left as the historical record of the 9.5.0 release. * Revert "[@mantine/core] Tooltip: Rename `interactive` prop to `hoverable`" This reverts commit 015a30332a0cd72b2d57c16a3601826127c507c0. * [@mantine/core] Tooltip: Remove link from interactive story * [@mantine/core] Tooltip: Simplify interactive prop description --------- Co-authored-by: Vitaly Rtishchev <rtivital@gmail.com> | 3 天前 | |
[core] Reformat imports with oxfmt 0.64 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> | 1 个月前 | |
[@mantine/core] ActionBar: Use `activity` keepMountedMode by default | 4 小时前 | |
[refactor] Fix peer dependencies warning | 1 个月前 |