Skip to content

Keep your coding agent up to date with the latest web best practices

Release v0.0.178

Micah Joccb800c95192
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index b92d1a1..627ca8a 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -8,7 +8,7 @@
"name": "modern-web-guidance",
"source": "./",
"description": "Keep your coding agent up to date with the latest web best practices",
- "version": "0.0.177"
+ "version": "0.0.178"
}
]
}
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 1778776..9c03e59 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "modern-web-guidance",
"description": "Keep your coding agent up to date with the latest web best practices",
- "version": "0.0.177",
+ "version": "0.0.178",
"author": {
"name": "Google Chrome"
}
diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json
index 70b66a3..ece71c9 100644
--- a/.cursor-plugin/plugin.json
+++ b/.cursor-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "modern-web-guidance",
"description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",
- "version": "0.0.177",
+ "version": "0.0.178",
"author": {
"name": "Google Chrome"
}
diff --git a/README.md b/README.md
index 9a88fc6..309bd2e 100644
--- a/README.md
+++ b/README.md
@@ -79,13 +79,12 @@ We cover the past several years of the web platform's new features, all the way
</tr>
</table>
-_View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/overlays/navigation-drawer.md).
+_View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/navigation-drawer.md).
-<!-- INJECT_SKILL_COVERAGE_START -->
#### The full list
<details>
-<summary><strong>102 modern web features</strong></summary>
+<summary><strong>103 modern web features</strong></summary>
### CSS & Layout (51 features)
@@ -121,26 +120,26 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro
| [&lt;link rel="preload">](https://web-platform-dx.github.io/web-features-explorer/features/link-rel-preload/) | [inert](https://web-platform-dx.github.io/web-features-explorer/features/inert/) | [popover="hint"](https://web-platform-dx.github.io/web-features-explorer/features/popover-hint/) |
| [blocking="render"](https://web-platform-dx.github.io/web-features-explorer/features/blocking-render/) | [Interest invokers](https://web-platform-dx.github.io/web-features-explorer/features/interest-invokers/) | |
-### JavaScript & APIs (31 features)
+### JavaScript & APIs (32 features)
| | | |
| :--- | :--- | :--- |
-| [AbortController and AbortSignal](https://web-platform-dx.github.io/web-features-explorer/features/aborting/) | [Language detector](https://web-platform-dx.github.io/web-features-explorer/features/languagedetector/) | [Speculation rules](https://web-platform-dx.github.io/web-features-explorer/features/speculation-rules/) |
-| [document.modelContext](https://web-platform-dx.github.io/web-features-explorer/features/document-modelcontext/) | [LanguageModel](https://web-platform-dx.github.io/web-features-explorer/features/languagemodel/) | [Summarizer](https://web-platform-dx.github.io/web-features-explorer/features/summarizer/) |
-| [enterkeyhint](https://web-platform-dx.github.io/web-features-explorer/features/enterkeyhint/) | [Long animation frames](https://web-platform-dx.github.io/web-features-explorer/features/long-animation-frames/) | [SVG](https://web-platform-dx.github.io/web-features-explorer/features/svg/) |
-| [Event timing](https://web-platform-dx.github.io/web-features-explorer/features/event-timing/) | [Navigation API](https://web-platform-dx.github.io/web-features-explorer/features/navigation/) | [Temporal](https://web-platform-dx.github.io/web-features-explorer/features/temporal/) |
-| [Federated credential management](https://web-platform-dx.github.io/web-features-explorer/features/fedcm/) | [Page visibility](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility/) | [Top-level await](https://web-platform-dx.github.io/web-features-explorer/features/top-level-await/) |
-| [Fetch](https://web-platform-dx.github.io/web-features-explorer/features/fetch/) | [Page visibility state](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility-state/) | [Translator](https://web-platform-dx.github.io/web-features-explorer/features/translator/) |
-| [fetchLater](https://web-platform-dx.github.io/web-features-explorer/features/fetchlater/) | [Partitioned cookies](https://web-platform-dx.github.io/web-features-explorer/features/partitioned-cookies/) | [User agent client hints](https://web-platform-dx.github.io/web-features-explorer/features/ua-client-hints/) |
-| [Form-associated WebMCP attributes](https://web-platform-dx.github.io/web-features-explorer/features/declarative-webmcp/) | [Permissions policy](https://web-platform-dx.github.io/web-features-explorer/features/permissions-policy/) | [Web authentication](https://web-platform-dx.github.io/web-features-explorer/features/webauthn/) |
-| [inputmode](https://web-platform-dx.github.io/web-features-explorer/features/inputmode/) | [Registered custom properties](https://web-platform-dx.github.io/web-features-explorer/features/registered-custom-properties/) | [Web authentication signal methods](https://web-platform-dx.github.io/web-features-explorer/features/webauthn-signals/) |
-| [Intersection observer](https://web-platform-dx.github.io/web-features-explorer/features/intersection-observer/) | [Resize observer](https://web-platform-dx.github.io/web-features-explorer/features/resize-observer/) | |
-| [Intl.DurationFormat](https://web-platform-dx.github.io/web-features-explorer/features/intl-duration-format/) | [Scheduler API](https://web-platform-dx.github.io/web-features-explorer/features/scheduler/) | |
+| [AbortController and AbortSignal](https://web-platform-dx.github.io/web-features-explorer/features/aborting/) | [Language detector](https://web-platform-dx.github.io/web-features-explorer/features/languagedetector/) | [Scheduler API](https://web-platform-dx.github.io/web-features-explorer/features/scheduler/) |
+| [document.modelContext](https://web-platform-dx.github.io/web-features-explorer/features/document-modelcontext/) | [LanguageModel](https://web-platform-dx.github.io/web-features-explorer/features/languagemodel/) | [Speculation rules](https://web-platform-dx.github.io/web-features-explorer/features/speculation-rules/) |
+| [enterkeyhint](https://web-platform-dx.github.io/web-features-explorer/features/enterkeyhint/) | [Lazy-loading images and iframes](https://web-platform-dx.github.io/web-features-explorer/features/loading-lazy/) | [Summarizer](https://web-platform-dx.github.io/web-features-explorer/features/summarizer/) |
+| [Event timing](https://web-platform-dx.github.io/web-features-explorer/features/event-timing/) | [Long animation frames](https://web-platform-dx.github.io/web-features-explorer/features/long-animation-frames/) | [SVG](https://web-platform-dx.github.io/web-features-explorer/features/svg/) |
+| [Federated credential management](https://web-platform-dx.github.io/web-features-explorer/features/fedcm/) | [Navigation API](https://web-platform-dx.github.io/web-features-explorer/features/navigation/) | [Temporal](https://web-platform-dx.github.io/web-features-explorer/features/temporal/) |
+| [Fetch](https://web-platform-dx.github.io/web-features-explorer/features/fetch/) | [Page visibility](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility/) | [Top-level await](https://web-platform-dx.github.io/web-features-explorer/features/top-level-await/) |
+| [fetchLater](https://web-platform-dx.github.io/web-features-explorer/features/fetchlater/) | [Page visibility state](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility-state/) | [Translator](https://web-platform-dx.github.io/web-features-explorer/features/translator/) |
+| [Form-associated WebMCP attributes](https://web-platform-dx.github.io/web-features-explorer/features/declarative-webmcp/) | [Partitioned cookies](https://web-platform-dx.github.io/web-features-explorer/features/partitioned-cookies/) | [User agent client hints](https://web-platform-dx.github.io/web-features-explorer/features/ua-client-hints/) |
+| [inputmode](https://web-platform-dx.github.io/web-features-explorer/features/inputmode/) | [Permissions policy](https://web-platform-dx.github.io/web-features-explorer/features/permissions-policy/) | [Web authentication](https://web-platform-dx.github.io/web-features-explorer/features/webauthn/) |
+| [Intersection observer](https://web-platform-dx.github.io/web-features-explorer/features/intersection-observer/) | [Registered custom properties](https://web-platform-dx.github.io/web-features-explorer/features/registered-custom-properties/) | [Web authentication signal methods](https://web-platform-dx.github.io/web-features-explorer/features/webauthn-signals/) |
+| [Intl.DurationFormat](https://web-platform-dx.github.io/web-features-explorer/features/intl-duration-format/) | [Resize observer](https://web-platform-dx.github.io/web-features-explorer/features/resize-observer/) | |
</details>
<details>
-<summary><strong>129 real-world developer use cases</strong></summary>
+<summary><strong>128 real-world developer use cases</strong></summary>
<h3>accessibility</h3>
@@ -155,18 +154,7 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro
<h3>css</h3>
-- **[animate-to-intrinsic-sizes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/animate-to-intrinsic-sizes.md)**: Smoothly animate interactive components (like accordions, menus, and expanding cards) to and from their natural dimensions.
-- **[calculate-with-intrinsic-sizes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/calculate-with-intrinsic-sizes.md)**: Calculate the size of an element based on its intrinsic size, while ensuring it fits within given design constraints.
-- **[child-state-based-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/child-state-based-styling.md)**: Build a component that changes its styling based on the state of one of its child elements. For example, a component that renders in light or dark mode based on whether a theme toggle is checked (or not).
-- **[content-based-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/content-based-styling.md)**: Build a component that changes its layout based on whether it contains specific child elements (or not). For example, if the component contains an image, use a multi-column layout, otherwise default to a single-column layout.
-- **[design-token-reactivity](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/design-token-reactivity.md)**: Define higher-order design tokens, like density modes (compact, comfortable, spacious) or themes and have descendant components react to changes directly and in component-appropriate ways.
-- **[dynamic-sibling-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md)**: Create dynamic visual spectrums or layout arrangements that automatically adapt to the number of elements in a group.
-- **[fluid-scaling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/fluid-scaling.md)**: Scale items like font size, spacing, and media sizes smoothly based on the parent container's size rather than using fixed breakpoints
-- **[individual-transform-properties](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/individual-transform-properties.md)**: Animate or override individual CSS transform properties (e.g. translate, rotate, scale) independently of other transform properties on a single element.
-- **[overflow-clipping-control](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/overflow-clipping-control.md)**: Adjust the visible clipping boundary of an element to align with the content edge, padding edge, or border edge—or a specified offset from any of these—offering finer-grained control over how content is clipped.
-- **[reduce-style-repetition](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/reduce-style-repetition.md)**: Reduce excessive style repetition by encapsulating complex or dynamic styling logic into reusable functions (such as a function that computes a gradient based on a set of input parameters).
-- **[size-aware-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/size-aware-styling.md)**: Build a component whose styles can be conditionally dependent on its own width or height, rather than the width or height of the viewport. For example a card component that can change its layouts depending on how large it is, or a call-to-action button that can conditionally display helper text based on its width.
-- **[style-parent-with-has](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/style-parent-with-has.md)**: Style parent elements of a form field (e.g. labels or fieldsets) when the field is invalid.
+- **[highlight-text-ranges](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/highlight-text-ranges.md)**: Highlight arbitrary text ranges on a page such as search results, spelling errors, or collaborative editing cursors.
<h3>forms</h3>
@@ -185,16 +173,13 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro
- **[select-menu-interaction](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/select-menu-interaction.md)**: Validate that a non-default option has been chosen in a select menu only after the user has interacted with the control.
- **[validate-input-after-interaction](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/validate-input-after-interaction.md)**: Show form field validation feedback (e.g. password complexity or email format requirements) only after the user has finished their initial interaction, avoiding premature errors on page load or while the user is typing.
-<h3>js</h3>
+<h3>passkeys</h3>
-- **[calculate-event-differentials](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/calculate-event-differentials.md)**: Calculate the duration and time remaining between dates and times.
-- **[capture-location-agnostic-data](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/capture-location-agnostic-data.md)**: Record chronological data that should not change based on a user's location, such as birthdates, recurring alarms, or national holidays.
-- **[coordinate-global-events](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/coordinate-global-events.md)**: Schedule future meetings or events by explicitly binding them to a geographical IANA time zone so that event times remain accurate regardless of Daylight Saving Time (DST) transitions, "skipped" or "repeated" hours during clock changes.
-- **[format-human-readable-durations](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/format-human-readable-durations.md)**: Present elapsed time or durations to users in a readable, localized format, with the flexibility to display either detailed unit breakdowns (e.g., "1 hour and 30 minutes") or total unit counts (e.g., "90 minutes") depending on context.
-- **[manage-recurring-intervals](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/manage-recurring-intervals.md)**: Calculate recurring intervals for subscription billings or payroll cycles, automatically adjusting for edge cases such as month-end transitions (e.g., adding one month to January 31st) to ensure accurate period calculations.
-- **[model-partial-time-concepts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/model-partial-time-concepts.md)**: Model date and time concepts that inherently lack a standard component (such as a specific year, day, or date) without using arbitrary placeholder values that introduce calculation errors.
-- **[stabilize-reactive-state](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/stabilize-reactive-state.md)**: Manage task deadlines or schedules in data-driven views without unexpected side effects from shared mutable state.
-- **[support-global-calendar-systems](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/support-global-calendar-systems.md)**: Display and calculate dates in non-Gregorian calendar systems (e.g., Islamic, Hebrew, or Chinese) accurately for international users.
+- **[passkey-authentication](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/passkeys/passkey-authentication.md)**: Authenticate a returning user with a passkey for primary sign-in.
+- **[passkey-conditional-create](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/passkeys/passkey-conditional-create.md)**: Silently register a passkey for an existing user after a successful password login.
+- **[passkey-management](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/passkeys/passkey-management.md)**: Let users view and manage the passkeys registered to their account.
+- **[passkey-reauthentication](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/passkeys/passkey-reauthentication.md)**: Verify a signed-in user's identity using their existing passkeys before a sensitive action.
+- **[passkey-registration](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/passkeys/passkey-registration.md)**: Register a passkey for an existing user account.
<h3>performance</h3>
@@ -204,12 +189,10 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro
- **[conditional-async-dependencies](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md)**: Conditionally load or initialize async dependencies (such as importing polyfills for missing web features) without requiring complex orchestration across all of a page's script dependencies.
- **[defer-rendering-heavy-content](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/defer-rendering-heavy-content.md)**: Reduce rendering times in content-heavy web pages (e.g. pages with long feeds, lots of articles, or complex dashboards), by deferring rendering for any content that is not immediately visible to the user.
- **[defer-work-until-scroll-ends](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/defer-work-until-scroll-ends.md)**: Defer expensive operations like DOM updates, data fetching, analytics tracking, or layout recalculation until after scrolling completes to maintain smooth scroll performance.
-- **[deliver-optimized-decorative-images](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/deliver-optimized-decorative-images.md)**: Deliver optimized decorative images (such as backgrounds, UI icons, or complex masks) by simultaneously providing next-generation image formats (like AVIF or WebP) alongside multiple pixel densities (like 1x and 2x) so the browser can dynamically negotiate the best combination of file size and visual quality for the user's device capabilities.
- **[deprioritize-background-fetches](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/deprioritize-background-fetches.md)**: Deprioritize background data fetches made with the Fetch API to prevent network contention with user-initiated requests.
- **[detect-initial-visibility-state](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md)**: Reliably determine whether a page was initially loaded in the background, even in cases where the script is loaded asynchronously after the user foregrounded the page.
- **[efficient-background-processing](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/efficient-background-processing.md)**: Conserve system resources and battery life by pausing background JavaScript execution (such as `&lt;canvas&gt;` animations, WebGL rendering, or high-frequency WebSocket data polling) when the component is off-screen and then resume them just-in-time when they scroll back into view.
- **[faster-spa-view-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/faster-spa-view-transitions.md)**: Enable faster transitions back to previously visited views in a Single-Page Application (SPA) by preserving their structural DOM state instead of destroying and rebuilding them on every navigation.
-- **[flicker-free-client-side-ab-testing](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/flicker-free-client-side-ab-testing.md)**: Deliver and render A/B tests, multi-variate tests, or other experiments using client-side JavaScript to alter or inject HTML, CSS, and JavaScript without the original content showing first before flickering or flashing to show the experiment content.
- **[full-session-analytics](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/full-session-analytics.md)**: Reliably track analytics, errors, and telemetry data across the user's entire page visit, and defer sending of the data until the user leaves the page.
- **[identify-heavy-scripts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.md)**: Identify the scripts most responsible for long animation frames
- **[identify-inp-causes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/identify-inp-causes.md)**: Identify slow running JavaScript that is impacting INP metric
@@ -226,91 +209,93 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro
- **[privacy](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/privacy/privacy.md)**: Action-oriented guidelines for web developers to implement privacy by design, data minimization, third-party audits, and secure data handling. Use this skill when designing applications, integrating third-party services, handling user data, or configuring security headers.
-<h3>security</h3>
-
-- **[passkey-authentication](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-authentication.md)**: Authenticate a returning user with a passkey for primary sign-in.
-- **[passkey-conditional-create](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-conditional-create.md)**: Silently register a passkey for an existing user after a successful password login.
-- **[passkey-management](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-management.md)**: Let users view and manage the passkeys registered to their account.
-- **[passkey-reauthentication](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-reauthentication.md)**: Verify a signed-in user's identity using their existing passkeys before a sensitive action.
-- **[passkey-registration](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-registration.md)**: Register a passkey for an existing user account.
-- **[passkeys](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkeys.md)**: Comprehensive orientation and cross-cutting principles for implementing WebAuthn and Passkeys in web applications. Use this guide when handling passkey registration, authentication, management, or reauthentication.
-
-<h3>ui-atoms</h3>
-
-- **[carousel-slide-effects](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/carousel-slide-effects.md)**: Create a carousel of slides with images or other visual elements, where each slide animates as they enter/center/exit their scroller. For example, the slides may fade-in/fade-out, rotate, get bigger or smaller, etc.
-- **[component-specific-light-dark-theme](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/component-specific-light-dark-theme.md)**: Force certain elements to be in light mode or dark mode (e.g. code blocks, media players, etc) independently of the page's color-scheme.
-- **[position-aware-tooltips](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md)**: Build tooltips and popovers with directional arrows (or other visual styling) that automatically point the correct way when the element flips to a fallback position.
-- **[pull-to-reveal](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/pull-to-reveal.md)**: Build a pull-to-reveal feature that would enable the user to pull down on the screen to reveal more content, like a search bar.
-- **[resilient-context-menus-and-nested-dropdowns](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md)**: Build accessible, responsive menus, tooltips, dropdowns, or contextual overlays that must be tethered to specific UI elements, guaranteeing that the overlay automatically repositions itself (e.g., flipping axes) when it encounters viewport edges, ensuring it never gets cut off.
-- **[scroll-position-aware-elements](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scroll-position-aware-elements.md)**: Build floating buttons or widgets (back-to-top, scroll-to-bottom, chat launchers, etc.) that appear and disappear based on whether the user has scrolled at all.
-- **[scroll-progress-indicator](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scroll-progress-indicator.md)**: Create a scroll progress bar, stepped progress tracker, or any visual affordance that communicates how far through a page or section the user has scrolled.
-- **[scrollability-affordance-hints](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scrollability-affordance-hints.md)**: Build scroll-shadow overlays, gradient fades, or directional arrow indicators that appear only when there's actually more content to scroll to in that direction.
-- **[shrinking-header-on-scroll](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/shrinking-header-on-scroll.md)**: Smoothly animate a fixed header or full-page cover on scroll to dynamically shrink, gain shadows, and transform its layout over a predefined scroll distance.
-
-<h3>ui-behaviors</h3>
-
-- **[anchor-positioning-tab-underline](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md)**: Transition an element seamlessly between two target element positions. For example, moving a selected tab underline between the previously selected tab and the currently selected tab.
-- **[animate-element-entry-exit](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/animate-element-entry-exit.md)**: Smoothly hide/show elements as they are added/removed from the DOM or as their display values are toggled.
-- **[animate-to-from-top-layer](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md)**: Animate elements such as dialogs, popovers, and tooltips as they're entering/exiting the top layer.
-- **[carousel-snap-highlights](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/carousel-snap-highlights.md)**: Visually highlight the currently snapped non-interactive item in scroll-snapping carousels, galleries, or full-page swipe experiences. For example, expanding a card when snapped, or revealing hidden content.
-- **[consistent-cross-document-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/consistent-cross-document-transitions.md)**: Ensure critical page state is loaded and stable before initiating a cross-document view transition. This means critical CSS styles are loaded and applied, critical JavaScript is loaded and run, and the HTML visible for the user's initial view of the page has been parsed before the transition runs.
-- **[cross-document-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/cross-document-transitions.md)**: Create smooth, seamless transitions between full page navigations, such as cross-fades, custom reveal effects, or morphing of content from one page to the next.
-- **[custom-button-actions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/custom-button-actions.md)**: Declaratively connect a button to any element to trigger custom, application-specific actions using declarative button commands, invoker commands, button commands, custom commands, or declarative toggle actions.
-- **[declarative-dialog-popover-control](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md)**: Toggle the visibility of a dialog or popover from a button without writing JavaScript.
-- **[directional-navigation-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/directional-navigation-transitions.md)**: Animate visual state changes to reflect the direction of a user's navigational flow, such as sliding new content in from the right when advancing forward or from the left when returning to a previous screen.
-- **[dynamic-sibling-animations](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md)**: Stagger animation or transition timing across sibling elements so each one starts after a computed delay based on its position in the sibling list.
-- **[group-element-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/group-element-transitions.md)**: Transition a group of similar elements simultaneously using the same transition logic, such as removing a product from a shopping cart and having all the other products animate into their new positions.
-- **[highlight-text-ranges](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/highlight-text-ranges.md)**: Highlight arbitrary text ranges on a page such as search results, spelling errors, or collaborative editing cursors.
-- **[interactive-content-reveal](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interactive-content-reveal.md)**: Create interactive reveal effects, such as a spotlight that follows the user's pointer to uncover details within an image or UI section.
-- **[interest-triggered-action-previews](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-action-previews.md)**: Show a live preview of a button's effect when a user signals interest (e.g. hovering, focusing, or long-pressing) but before they commit to clicking.
-- **[interest-triggered-tooltips](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md)**: Show a tooltip or supplemental information when a user hovers over, focuses on, or long-presses an interactive element, without requiring a click.
-- **[light-dismiss-a-dialog](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/light-dismiss-a-dialog.md)**: Create a modal dialog that can be closed via light dismiss (i.e. clicking or tapping outside of the dialog)
-- **[move-dom-element-without-losing-state](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/move-dom-element-without-losing-state.md)**: Move or reparent a DOM element without losing important element state, such as interactivity states (:focus/:active), `&lt;iframe&gt;` loading state, animation/transition state, etc
-- **[parallax-scroll-effects](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/parallax-scroll-effects.md)**: Create scroll-based effects (such as parallax) where foreground and background layers move at different rates, creating a sense of depth as the user scrolls.
-- **[persistent-top-layer-ui](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/persistent-top-layer-ui.md)**: Keep a modal dialog, fullscreen element, or native popover visibly open and functionally active when its underlying DOM node is moved or reparented in the DOM.
-- **[physics-based-easing](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/physics-based-easing.md)**: Create custom, physics-based animation and transition effects, like bounce and spring, that feel more natural and engaging than traditional easing curves.
-- **[platform-controls-dismiss-dialog](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/platform-controls-dismiss-dialog.md)**: Create a modal dialog that can be closed via standard platform-specific user actions, such as pressing the `Esc` key on desktop platforms, or a "back" or "dismiss" gesture on mobile platforms
-- **[same-document-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/same-document-transitions.md)**: Visually connect persisting elements across different page states or navigations in a Single Page Application (SPA) (e.g. expanding a product thumbnail into a full-bleed hero image) by smoothly morphing their size, position, or other styling properties.
-- **[scroll-entry-exit-effects](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-entry-exit-effects.md)**: Create fade-in, scale-up, or other complex reveal-type effects on elements as they enter and exit the scrollport (or viewport) while the user is scrolling.
-- **[scroll-snap-realtime-feedback](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-realtime-feedback.md)**: Provide real-time visual feedback in linked UI elements while a user scrolls through snap-aligned content, before the scroll gesture completes.
-- **[scroll-snap-state-sync](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-state-sync.md)**: Synchronize navigation indicators, linked content panels, and analytics tracking with the actively snapped item in a scrollable container.
-- **[scroll-target-on-load](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md)**: Build a scrollable list of elements (e.g. a carousel of images or a chat conversation thread) that can be displayed with a particular element scrolled into view on the initial render.
-- **[scrollytelling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scrollytelling.md)**: Animate visual properties on a target element — such as fading a backdrop, shifting a background color, or to create scrollytelling experiences — driven entirely by the scrollport position of a completely different element.
-- **[search-hidden-content](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/search-hidden-content.md)**: Hide content from view using patterns such as accordions, tabs, and "Read more" sections, while ensuring the hidden text reveals itself during native "Find in page" searches, allows search engine indexing, supports URL fragment deep links, and maintains ARIA accessibility.
-- **[swipe-to-remove](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/swipe-to-remove.md)**: Let users act on items in a list (remove, archive, mark as read, etc.) with a horizontal swipe gesture, so they can process entries quickly without tapping a separate control.
-
-<h3>ui-components</h3>
-
-- **[navigation-drawer](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/navigation-drawer.md)**: Create a navigation drawer component that, when triggered from a menu button, slides in from the side overlayed on top of existing page content, and slides out when dismissed (by swiping away, tapping outside, or pressing escape).
-- **[persistent-app-tours](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md)**: Create persistent onboarding walkthroughs using tethered native overlays that stay open during user interaction.
-- **[persistent-toast-notifications](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/persistent-toast-notifications.md)**: Create non-intrusive toast and overlay notifications for persistent, stackable messaging and state communication.
-- **[stack-drill-down](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/stack-drill-down.md)**: Build full-screen hierarchical navigation that lets users drill down into nested views and swipe or navigate back to return, with browser history kept in sync.
-
-<h3>visual-design</h3>
-
-- **[adapt-scrollbar-to-contrast-preferences](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/adapt-scrollbar-to-contrast-preferences.md)**: Enhance scrollbar visibility for users who prefer high-contrast interfaces
-- **[apply-webgl-shaders](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/apply-webgl-shaders.md)**: Apply custom visual effects with WebGL shaders to HTML content.
-- **[complex-shapes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/complex-shapes.md)**: Clip elements and their content to any free-form shape, like a symbol, brush stroke, or organic texture for more expressive designs.
-- **[customize-scrollbar-color-and-thickness](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/customize-scrollbar-color-and-thickness.md)**: Customize the color or thickness of a scrollbar
-- **[dark-mode](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/dark-mode.md)**: Implement dark mode support in a way that respects the user's light/dark theme preference and adapts browser UI (e.g. scrollbars, form controls, etc)
-- **[export-html-media-from-canvas](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/export-html-media-from-canvas.md)**: Capture and export dynamic HTML content as images or video frames from within canvas.
-- **[expose-canvas-content-to-browser-features](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/expose-canvas-content-to-browser-features.md)**: Expose content rendered in a canvas to browser features like assistive technologies, translation, or reading mode.
-- **[improve-text-layout-and-legibility](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/improve-text-layout-and-legibility.md)**: Improve the layout and legibility of short standalone text content, such as headings no longer than a few lines, by enabling the browser to apply evenly balanced line breaks when wrapping text.
-- **[interactive-content-in-3d-scenes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/interactive-content-in-3d-scenes.md)**: Integrate interactive HTML elements into a 3D scene.
-- **[precise-text-alignment](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/precise-text-alignment.md)**: Achieve precise vertical alignment with text of any font. For example, exactly equal visual padding above and below text, or aligning text perfectly flush with adjacent icons or images.
-- **[prevent-text-wrapping](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/prevent-text-wrapping.md)**: Ensure the browser does not insert line breaks into text and will allow text to overflow its container.
-- **[shaped-cutouts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/shaped-cutouts.md)**: Combine multiple shapes to create complex cutouts or 'knockout' effects in elements, such as adding a notch to an element.
-- **[soft-edge-content-fade](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/soft-edge-content-fade.md)**: Apply a transparency gradient to content edges to indicate further scrollable areas or to obscure payment-walled text.
-- **[visually-stable-font-fallbacks](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-stable-font-fallbacks.md)**: Define font styles such that text remains readable and visually consistent in the event that there's a swap between the perferred font and one of the fallbacks (or vise versa).
-- **[visually-stable-mixed-fonts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-stable-mixed-fonts.md)**: Define font styles such that text remains readable and visually consistent in situations where multiple fonts are used to render a single block of text.
-- **[visually-texture-content](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-texture-content.md)**: Apply realistic weathering and texture patterns to elements to give them an organic, aged, or physical material appearance.
+<h3>user-experience</h3>
+
+- **[adapt-scrollbar-to-contrast-preferences](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/adapt-scrollbar-to-contrast-preferences.md)**: Enhance scrollbar visibility for users who prefer high-contrast interfaces
+- **[anchor-positioning-tab-underline](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/anchor-positioning-tab-underline.md)**: Transition an element seamlessly between two target element positions. For example, moving a selected tab underline between the previously selected tab and the currently selected tab.
+- **[animate-element-entry-exit](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/animate-element-entry-exit.md)**: Smoothly hide/show elements as they are added/removed from the DOM or as their display values are toggled.
+- **[animate-to-from-top-layer](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/animate-to-from-top-layer.md)**: Animate elements such as dialogs, popovers, and tooltips as they're entering/exiting the top layer.
+- **[animate-to-intrinsic-sizes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/animate-to-intrinsic-sizes.md)**: Smoothly animate interactive components (like accordions, menus, and expanding cards) to and from their natural dimensions.
+- **[apply-webgl-shaders](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/apply-webgl-shaders.md)**: Apply custom visual effects with WebGL shaders to HTML content.
+- **[calculate-event-differentials](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/calculate-event-differentials.md)**: Calculate the duration and time remaining between dates and times.
+- **[calculate-with-intrinsic-sizes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/calculate-with-intrinsic-sizes.md)**: Calculate the size of an element based on its intrinsic size, while ensuring it fits within given design constraints.
+- **[capture-location-agnostic-data](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/capture-location-agnostic-data.md)**: Record chronological data that should not change based on a user's location, such as birthdates, recurring alarms, or national holidays.
+- **[carousel-slide-effects](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/carousel-slide-effects.md)**: Create a carousel of slides with images or other visual elements, where each slide animates as they enter/center/exit their scroller. For example, the slides may fade-in/fade-out, rotate, get bigger or smaller, etc.
+- **[carousel-snap-highlights](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/carousel-snap-highlights.md)**: Visually highlight the currently snapped non-interactive item in scroll-snapping carousels, galleries, or full-page swipe experiences. For example, expanding a card when snapped, or revealing hidden content.
+- **[child-state-based-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/child-state-based-styling.md)**: Build a component that changes its styling based on the state of one of its child elements. For example, a component that renders in light or dark mode based on whether a theme toggle is checked (or not).
+- **[complex-shapes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/complex-shapes.md)**: Clip elements and their content to any free-form shape, like a symbol, brush stroke, or organic texture for more expressive designs.
+- **[component-specific-light-dark-theme](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/component-specific-light-dark-theme.md)**: Force certain elements to be in light mode or dark mode (e.g. code blocks, media players, etc) independently of the page's color-scheme.
+- **[consistent-cross-document-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/consistent-cross-document-transitions.md)**: Ensure critical page state is loaded and stable before initiating a cross-document view transition. This means critical CSS styles are loaded and applied, critical JavaScript is loaded and run, and the HTML visible for the user's initial view of the page has been parsed before the transition runs.
+- **[content-based-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/content-based-styling.md)**: Build a component that changes its layout based on whether it contains specific child elements (or not). For example, if the component contains an image, use a multi-column layout, otherwise default to a single-column layout.
+- **[coordinate-global-events](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/coordinate-global-events.md)**: Schedule future meetings or events by explicitly binding them to a geographical IANA time zone so that event times remain accurate regardless of Daylight Saving Time (DST) transitions, "skipped" or "repeated" hours during clock changes.
+- **[cross-document-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/cross-document-transitions.md)**: Create smooth, seamless transitions between full page navigations, such as cross-fades, custom reveal effects, or morphing of content from one page to the next.
+- **[custom-button-actions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/custom-button-actions.md)**: Declaratively connect a button to any element to trigger custom, application-specific actions using declarative button commands, invoker commands, button commands, custom commands, or declarative toggle actions.
+- **[customize-scrollbar-color-and-thickness](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/customize-scrollbar-color-and-thickness.md)**: Customize the color or thickness of a scrollbar
+- **[dark-mode](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/dark-mode.md)**: Implement dark mode support in a way that respects the user's light/dark theme preference and adapts browser UI (e.g. scrollbars, form controls, etc)
+- **[declarative-dialog-popover-control](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/declarative-dialog-popover-control.md)**: Toggle the visibility of a dialog or popover from a button without writing JavaScript.
+- **[deliver-optimized-decorative-images](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/deliver-optimized-decorative-images.md)**: Deliver optimized decorative images (such as backgrounds, UI icons, or complex masks) by simultaneously providing next-generation image formats (like AVIF or WebP) alongside multiple pixel densities (like 1x and 2x) so the browser can dynamically negotiate the best combination of file size and visual quality for the user's device capabilities.
+- **[design-token-reactivity](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/design-token-reactivity.md)**: Define higher-order design tokens, like density modes (compact, comfortable, spacious) or themes and have descendant components react to changes directly and in component-appropriate ways.
+- **[directional-navigation-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/directional-navigation-transitions.md)**: Animate visual state changes to reflect the direction of a user's navigational flow, such as sliding new content in from the right when advancing forward or from the left when returning to a previous screen.
+- **[dynamic-sibling-animations](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/dynamic-sibling-animations.md)**: Stagger animation or transition timing across sibling elements so each one starts after a computed delay based on its position in the sibling list.
+- **[dynamic-sibling-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/dynamic-sibling-styling.md)**: Create dynamic visual spectrums or layout arrangements that automatically adapt to the number of elements in a group.
+- **[export-html-media-from-canvas](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/export-html-media-from-canvas.md)**: Capture and export dynamic HTML content as images or video frames from within canvas.
+- **[expose-canvas-content-to-browser-features](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/expose-canvas-content-to-browser-features.md)**: Expose content rendered in a canvas to browser features like assistive technologies, translation, or reading mode.
+- **[flicker-free-client-side-ab-testing](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/flicker-free-client-side-ab-testing.md)**: Deliver and render A/B tests, multi-variate tests, or other experiments using client-side JavaScript to alter or inject HTML, CSS, and JavaScript without the original content showing first before flickering or flashing to show the experiment content.
+- **[fluid-scaling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/fluid-scaling.md)**: Scale items like font size, spacing, and media sizes smoothly based on the parent container's size rather than using fixed breakpoints
+- **[format-human-readable-durations](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/format-human-readable-durations.md)**: Present elapsed time or durations to users in a readable, localized format, with the flexibility to display either detailed unit breakdowns (e.g., "1 hour and 30 minutes") or total unit counts (e.g., "90 minutes") depending on context.
+- **[group-element-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/group-element-transitions.md)**: Transition a group of similar elements simultaneously using the same transition logic, such as removing a product from a shopping cart and having all the other products animate into their new positions.
+- **[improve-text-layout-and-legibility](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/improve-text-layout-and-legibility.md)**: Improve the layout and legibility of short standalone text content, such as headings no longer than a few lines, by enabling the browser to apply evenly balanced line breaks when wrapping text.
+- **[individual-transform-properties](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/individual-transform-properties.md)**: Animate or override individual CSS transform properties (e.g. translate, rotate, scale) independently of other transform properties on a single element.
+- **[interactive-content-in-3d-scenes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/interactive-content-in-3d-scenes.md)**: Integrate interactive HTML elements into a 3D scene.
+- **[interactive-content-reveal](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/interactive-content-reveal.md)**: Create interactive reveal effects, such as a spotlight that follows the user's pointer to uncover details within an image or UI section.
+- **[interest-triggered-action-previews](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/interest-triggered-action-previews.md)**: Show a live preview of a button's effect when a user signals interest (e.g. hovering, focusing, or long-pressing) but before they commit to clicking.
+- **[interest-triggered-tooltips](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/interest-triggered-tooltips.md)**: Show a tooltip or supplemental information when a user hovers over, focuses on, or long-presses an interactive element, without requiring a click.
+- **[light-dismiss-a-dialog](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/light-dismiss-a-dialog.md)**: Create a modal dialog that can be closed via light dismiss (i.e. clicking or tapping outside of the dialog)
+- **[manage-recurring-intervals](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/manage-recurring-intervals.md)**: Calculate recurring intervals for subscription billings or payroll cycles, automatically adjusting for edge cases such as month-end transitions (e.g., adding one month to January 31st) to ensure accurate period calculations.
+- **[model-partial-time-concepts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/model-partial-time-concepts.md)**: Model date and time concepts that inherently lack a standard component (such as a specific year, day, or date) without using arbitrary placeholder values that introduce calculation errors.
+- **[move-dom-element-without-losing-state](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/move-dom-element-without-losing-state.md)**: Move or reparent a DOM element without losing important element state, such as interactivity states (:focus/:active), `&lt;iframe&gt;` loading state, animation/transition state, etc
+- **[navigation-drawer](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/navigation-drawer.md)**: Create a navigation drawer component that, when triggered from a menu button, slides in from the side overlayed on top of existing page content, and slides out when dismissed (by swiping away, tapping outside, or pressing escape).
+- **[overflow-clipping-control](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/overflow-clipping-control.md)**: Adjust the visible clipping boundary of an element to align with the content edge, padding edge, or border edge—or a specified offset from any of these—offering finer-grained control over how content is clipped.
+- **[parallax-scroll-effects](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/parallax-scroll-effects.md)**: Create scroll-based effects (such as parallax) where foreground and background layers move at different rates, creating a sense of depth as the user scrolls.
+- **[persistent-app-tours](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/persistent-app-tours.md)**: Create persistent onboarding walkthroughs using tethered native overlays that stay open during user interaction.
+- **[persistent-toast-notifications](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/persistent-toast-notifications.md)**: Create non-intrusive toast and overlay notifications for persistent, stackable messaging and state communication.
+- **[persistent-top-layer-ui](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/persistent-top-layer-ui.md)**: Keep a modal dialog, fullscreen element, or native popover visibly open and functionally active when its underlying DOM node is moved or reparented in the DOM.
+- **[physics-based-easing](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/physics-based-easing.md)**: Create custom, physics-based animation and transition effects, like bounce and spring, that feel more natural and engaging than traditional easing curves.
+- **[platform-controls-dismiss-dialog](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/platform-controls-dismiss-dialog.md)**: Create a modal dialog that can be closed via standard platform-specific user actions, such as pressing the `Esc` key on desktop platforms, or a "back" or "dismiss" gesture on mobile platforms
+- **[position-aware-tooltips](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/position-aware-tooltips.md)**: Build tooltips and popovers with directional arrows (or other visual styling) that automatically point the correct way when the element flips to a fallback position.
+- **[precise-text-alignment](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/precise-text-alignment.md)**: Achieve precise vertical alignment with text of any font. For example, exactly equal visual padding above and below text, or aligning text perfectly flush with adjacent icons or images.
+- **[prevent-text-wrapping](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/prevent-text-wrapping.md)**: Ensure the browser does not insert line breaks into text and will allow text to overflow its container.
+- **[pull-to-reveal](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/pull-to-reveal.md)**: Build a pull-to-reveal feature that would enable the user to pull down on the screen to reveal more content, like a search bar.
+- **[reduce-style-repetition](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/reduce-style-repetition.md)**: Reduce excessive style repetition by encapsulating complex or dynamic styling logic into reusable functions (such as a function that computes a gradient based on a set of input parameters).
+- **[resilient-context-menus-and-nested-dropdowns](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/resilient-context-menus-and-nested-dropdowns.md)**: Build accessible, responsive menus, tooltips, dropdowns, or contextual overlays that must be tethered to specific UI elements, guaranteeing that the overlay automatically repositions itself (e.g., flipping axes) when it encounters viewport edges, ensuring it never gets cut off.
+- **[same-document-transitions](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/same-document-transitions.md)**: Visually connect persisting elements across different page states or navigations in a Single Page Application (SPA) (e.g. expanding a product thumbnail into a full-bleed hero image) by smoothly morphing their size, position, or other styling properties.
+- **[scroll-entry-exit-effects](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scroll-entry-exit-effects.md)**: Create fade-in, scale-up, or other complex reveal-type effects on elements as they enter and exit the scrollport (or viewport) while the user is scrolling.
+- **[scroll-position-aware-elements](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scroll-position-aware-elements.md)**: Build floating buttons or widgets (back-to-top, scroll-to-bottom, chat launchers, etc.) that appear and disappear based on whether the user has scrolled at all.
+- **[scroll-progress-indicator](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scroll-progress-indicator.md)**: Create a scroll progress bar, stepped progress tracker, or any visual affordance that communicates how far through a page or section the user has scrolled.
+- **[scroll-snap-realtime-feedback](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scroll-snap-realtime-feedback.md)**: Provide real-time visual feedback in linked UI elements while a user scrolls through snap-aligned content, before the scroll gesture completes.
+- **[scroll-snap-state-sync](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scroll-snap-state-sync.md)**: Synchronize navigation indicators, linked content panels, and analytics tracking with the actively snapped item in a scrollable container.
+- **[scroll-target-on-load](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scroll-target-on-load.md)**: Build a scrollable list of elements (e.g. a carousel of images or a chat conversation thread) that can be displayed with a particular element scrolled into view on the initial render.
+- **[scrollability-affordance-hints](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scrollability-affordance-hints.md)**: Build scroll-shadow overlays, gradient fades, or directional arrow indicators that appear only when there's actually more content to scroll to in that direction.
+- **[scrollytelling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/scrollytelling.md)**: Animate visual properties on a target element — such as fading a backdrop, shifting a background color, or to create scrollytelling experiences — driven entirely by the scrollport position of a completely different element.
+- **[search-hidden-content](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/search-hidden-content.md)**: Hide content from view using patterns such as accordions, tabs, and "Read more" sections, while ensuring the hidden text reveals itself during native "Find in page" searches, allows search engine indexing, supports URL fragment deep links, and maintains ARIA accessibility.
+- **[shaped-cutouts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/shaped-cutouts.md)**: Combine multiple shapes to create complex cutouts or 'knockout' effects in elements, such as adding a notch to an element.
+- **[shrinking-header-on-scroll](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/shrinking-header-on-scroll.md)**: Smoothly animate a fixed header or full-page cover on scroll to dynamically shrink, gain shadows, and transform its layout over a predefined scroll distance.
+- **[size-aware-styling](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/size-aware-styling.md)**: Build a component whose styles can be conditionally dependent on its own width or height, rather than the width or height of the viewport. For example a card component that can change its layouts depending on how large it is, or a call-to-action button that can conditionally display helper text based on its width.
+- **[soft-edge-content-fade](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/soft-edge-content-fade.md)**: Apply a transparency gradient to content edges to indicate further scrollable areas or to obscure payment-walled text.
+- **[stabilize-reactive-state](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/stabilize-reactive-state.md)**: Manage task deadlines or schedules in data-driven views without unexpected side effects from shared mutable state.
+- **[stack-drill-down](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/stack-drill-down.md)**: Build full-screen hierarchical navigation that lets users drill down into nested views and swipe or navigate back to return, with browser history kept in sync.
+- **[style-parent-with-has](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/style-parent-with-has.md)**: Style parent elements of a form field (e.g. labels or fieldsets) when the field is invalid.
+- **[support-global-calendar-systems](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/support-global-calendar-systems.md)**: Display and calculate dates in non-Gregorian calendar systems (e.g., Islamic, Hebrew, or Chinese) accurately for international users.
+- **[swipe-to-remove](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/swipe-to-remove.md)**: Let users act on items in a list (remove, archive, mark as read, etc.) with a horizontal swipe gesture, so they can process entries quickly without tapping a separate control.
+- **[visually-stable-font-fallbacks](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/visually-stable-font-fallbacks.md)**: Define font styles such that text remains readable and visually consistent in the event that there's a swap between the perferred font and one of the fallbacks (or vise versa).
+- **[visually-stable-mixed-fonts](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/visually-stable-mixed-fonts.md)**: Define font styles such that text remains readable and visually consistent in situations where multiple fonts are used to render a single block of text.
+- **[visually-texture-content](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/visually-texture-content.md)**: Apply realistic weathering and texture patterns to elements to give them an organic, aged, or physical material appearance.
<h3>webmcp</h3>
- **[agentic-forms](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/agentic-forms.md)**: Expose client-side functionality as tools to AI agents by annotating standard HTML forms with WebMCP attributes.
- **[agentic-javascript-tools](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md)**: Programmatically register client-side JavaScript functions as tools for AI agents using the WebMCP Imperative API.
</details>
-<!-- INJECT_SKILL_COVERAGE_END -->
### Safe Adoption of Modern Features
@@ -406,20 +391,18 @@ We developed a robust eval harness to ensure that the content is **empirically p
### Recent eval results snapshot
-<!-- INJECT_EVAL_RESULTS_START -->
| Date | Agent + Model | Tasks / Assertions | Unguided → Guided (Uplift) |
| :--- | :--- | :---: | :---: |
-| Jul 6 | codex_cli (gpt-5.5) | 129 / 1071 | 57% → 84% (**+27pp**) |
-| Jul 6 | claude_code (sonnet-5) | 129 / 1071 | 52% → 87% (**+35pp**) |
-| Jul 6 | antigravity | 129 / 1071 | 54% → 87% (**+33pp**) |
-| Jul 3 | codex_cli (gpt-5.5) | 129 / 1071 | 52% → 78% (**+26pp**) |
-| Jul 3 | claude_code (sonnet-5) | 129 / 1071 | 48% → 82% (**+34pp**) |
-| Jul 1 | claude_code (sonnet-5) | 129 / 1071 | 49% → 84% (**+35pp**) |
-| Jul 1 | antigravity | 129 / 1071 | 53% → 83% (**+30pp**) |
-| Jun 29 | codex_cli (gpt-5.5) | 129 / 1071 | 51% → 78% (**+27pp**) |
-| Jun 29 | claude_code (opus-4-8) | 129 / 1071 | 53% → 88% (**+35pp**) |
-| Jun 29 | antigravity | 129 / 1071 | 50% → 78% (**+28pp**) |
-<!-- INJECT_EVAL_RESULTS_END -->
+| May 18 | claude_code (opus-4-7) | 75 / 603 | 52% → 85% (**+33pp**) |
+| May 17 | claude_code (opus-4-7) | 75 / 603 | 54% → 85% (**+31pp**) |
+| May 16 | codex_cli (gpt-5.5) | 75 / 603 | 49% → 82% (**+33pp**) |
+| May 16 | claude_code (opus-4-7) | 75 / 603 | 51% → 86% (**+35pp**) |
+| May 15 | codex_cli (gpt-5.5) | 74 / 600 | 52% → 81% (**+29pp**) |
+| May 15 | claude_code (opus-4-7) | 74 / 600 | 53% → 82% (**+29pp**) |
+| May 15 | antigravity | 74 / 600 | 47% → 91% (**+44pp**) |
+| May 14 | antigravity | 68 / 554 | 47% → 91% (**+44pp**) |
+| Apr 30 | claude_code (opus-4-6) | 66 / 516 | 44% → 81% (**+37pp**) |
+| Apr 28 | claude_code (opus-4-6) | 66 / 524 | 41% → 77% (**+36pp**) |
## <img src="https://github.com/GoogleChrome/modern-web-guidance/raw/main/.github/img/boxes.svg" width="24" height="24" style="vertical-align: middle; margin-right: 4px;"> Available Skill Packs
diff --git a/gemini-extension.json b/gemini-extension.json
index 1778776..9c03e59 100644
--- a/gemini-extension.json
+++ b/gemini-extension.json
@@ -1,7 +1,7 @@
{
"name": "modern-web-guidance",
"description": "Keep your coding agent up to date with the latest web best practices",
- "version": "0.0.177",
+ "version": "0.0.178",
"author": {
"name": "Google Chrome"
}
diff --git a/package.json b/package.json
index 5402f8e..901cb08 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"displayName": "Modern Web Guidance",
"description": "Keep your agent up to date on the latest web best practices.",
"license": "Apache-2.0",
- "version": "0.0.177",
+ "version": "0.0.178",
"publisher": "GoogleChrome",
"repository": {
"url": "https://github.com/GoogleChrome/modern-web-guidance-src"
diff --git a/skills/modern-web-guidance/guides/accessibility/accessibility.md b/skills/modern-web-guidance/guides/accessibility/accessibility.md
index ed2e168..84292aa 100644
--- a/skills/modern-web-guidance/guides/accessibility/accessibility.md
+++ b/skills/modern-web-guidance/guides/accessibility/accessibility.md
@@ -12,7 +12,7 @@ Keep these principles in mind throughout:
### Actionable Guidelines
#### DOs
-- **Place all content within landmarks**: Wrap each relevant part of the page in `<header>`, `<nav>`, `<main>`, `<aside>`, and `<footer>` elements so assistive-tech users can jump between regions.
+- **Place all content within landmarks**: Wrap the page in `<header>`, `<nav>`, `<main>`, `<aside>`, and `<footer>` so assistive-tech users can jump between regions.
- **Structure main content with headings**: Use `<h1>`–`<h6>` sequentially (no jumping `<h1>` → `<h4>`) so screen-reader users get a navigable outline.
- **Use lists for repeated, contiguous content**: `<ul>`/`<ol>` give assistive tech a count up front and let users skip the entire group.
- **Provide skip links** prior to repeated content like site headers with navigation or long/infinite lists, so that keyboard users can easily bypass them. Make sure the target is focusable (e.g. `<main id="content" tabindex="-1">`).
diff --git a/skills/modern-web-guidance/guides/built-in-ai/prompt-api.md b/skills/modern-web-guidance/guides/built-in-ai/prompt-api.md
deleted file mode 100644
index bd1e914..0000000
--- a/skills/modern-web-guidance/guides/built-in-ai/prompt-api.md
+++ /dev/null
@@ -1,189 +0,0 @@
-The Prompt API allows developers to run natural language processing tasks directly in the browser using **Gemini Nano**. This built-in AI approach ensures user privacy, reduces server costs, and enables offline functionality.
-
-## 1. Getting Started and Hardware Requirements
-
-The Prompt API is currently available in Chrome as of version 148 (Desktop) for Windows, macOS, Linux, and Chromebook Plus.
-
-### Hardware Prerequisites
-
-- **Storage**: 22 GB free space (for the initial profile and model).
-- **Memory/CPU**: 16 GB RAM and 4+ CPU cores.
-- **GPU**: 4 GB VRAM or more (Required for audio input).
-- **Network**: Required only for the initial model download.
-
-### Initializing the API
-
-Check model availability before triggering a download:
-
-```javascript
-const availability = await LanguageModel.availability();
-
-// Do not call create() when unavailable — the model cannot run on this device.
-if (availability !== 'unavailable') {
- const session = await LanguageModel.create({
- monitor(m) {
- // Inform the user while the model downloads so the UI doesn't appear frozen.
- m.addEventListener('downloadprogress', (e) => {
- console.log(`Downloaded ${e.loaded * 100}%`);
- });
- },
- });
-}
-```
-
-## 2. Core Prompting Capabilities
-
-Session examples in this section omit `session.destroy()` for brevity. Always call `session.destroy()` when a session is no longer needed to free device memory (see Section 5).
-
-### Basic and Streamed Output
-
-For short responses, use `prompt()`. For longer content, use `promptStreaming()` to provide a more responsive UI.
-
-**MANDATORY**: Never assign model output to `innerHTML`. Model output is untrusted and can contain injected markup. Always use `textContent` or a sanitizer.
-
-```javascript
-const session = await LanguageModel.create();
-
-// prompt() accumulates the full response before resolving — use for short, one-shot output.
-const result = await session.prompt('Write a haiku about coding.');
-// textContent, not innerHTML — model output is untrusted and must not be parsed as markup.
-outputEl.textContent = result;
-
-// promptStreaming() yields independent chunks that must be concatenated;
-// use for longer content so each chunk can be rendered progressively.
-const stream = session.promptStreaming('Write a long story about a robot.');
-let completeResult = '';
-for await (const chunk of stream) {
- completeResult += chunk;
- outputEl.append(chunk);
-}
-console.log('Full story:', completeResult);
-```
-
-### Multimodal Input
-
-The Prompt API supports text, audio, and visual inputs (images, canvas, video frames).
-
-```javascript
-const session = await LanguageModel.create({
- // Declaring expected input types lets the browser optimize model loading.
- expectedInputs: [{ type: 'text' }, { type: 'image' }],
- expectedOutputs: [{ type: 'text' }],
-});
-
-const response = await session.prompt([
- {
- role: 'user',
- content: [
- { type: 'text', value: 'What is in this image?' },
- { type: 'image', value: document.querySelector('canvas') },
- ],
- },
-]);
-```
-
-## 3. Advanced Session Management
-
-Sessions allow the model to maintain context across multiple interactions.
-
-### Context and Quota
-
-Each session has a maximum token limit. You can monitor usage via `session.contextUsage` and `session.contextWindow`. If the window overflows, the oldest messages (except the system prompt) are dropped.
-
-### Cloning Sessions
-
-Cloning is efficient for starting parallel conversations that share the same initial context (like a "system" personality) without re-initializing.
-
-```javascript
-const mainSession = await LanguageModel.create({
- initialPrompts: [{ role: 'system', content: 'You speak like a pirate.' }],
-});
-
-const branchA = await mainSession.clone();
-const branchB = await mainSession.clone();
-// Destroy the base after cloning — the clones own their own context from here.
-mainSession.destroy();
-```
-
-### Restoring Past Sessions
-
-While a native "restore" feature is in development, you can recreate a session by feeding previous history into `initialPrompts`.
-
-**Note**: `localStorage` is unencrypted and persistent. Stored conversation history may include user PII — consider the privacy implications before persisting chat history.
-
-```javascript
-// || '[]' ensures JSON.parse never receives null when the key doesn't exist yet.
-const history = JSON.parse(localStorage.getItem('chat_history') || '[]');
-const session = await LanguageModel.create({
- initialPrompts: history, // Array of {role, content} objects
-});
-```
-
-## 4. Structured Output with JSON Schema
-
-To prevent the model from adding "chatter" (e.g., "Sure, here is your JSON:"), use a **JSON Schema** via the `responseConstraint` field. This ensures the output is valid JSON that can be parsed immediately.
-
-### Example: Sentiment Classification
-
-```javascript
-// Pass the schema as a plain object — do not JSON.stringify() it first.
-const schema = {
- type: 'object',
- properties: {
- rating: { type: 'number', minimum: 1, maximum: 5 },
- is_positive: { type: 'boolean' },
- },
- required: ['rating', 'is_positive'],
-};
-
-const result = await session.prompt(
- "Rate the following feedback: 'The food was great!'",
- { responseConstraint: schema },
-);
-
-const data = JSON.parse(result);
-console.log(data.rating); // 5
-```
-
-### Constraints and Prefixes
-
-You can guide the model further by prefilling the assistant's response using `prefix: true`.
-
-````javascript
-const character = await session.prompt([
- { role: 'user', content: 'Create a character sheet' },
- { role: 'assistant', content: '```json\n', prefix: true },
-]);
-````
-
-## 5. Best Practices and Safety
-
-- **Resource Cleanup**: Always call `session.destroy()` when a conversation is finished to free up memory.
-- **Output Safety**: Model output is untrusted. Always write results to `textContent`, not `innerHTML`, to prevent XSS injection from malicious model output.
-- Use a sanitizer like the native Sanitizer API or DOMPurify if you need to allow limited HTML.
-- **Aborting Tasks**: Use `AbortController` to allow users to stop long-running generations. Pass the `signal` to `prompt()` or `promptStreaming()`, not to `LanguageModel.create()`.
-- **Security**: Use Permission Policies to control access in iframes: `<iframe src="..." allow="language-model"></iframe>`.
-- **Design**: Review the [People + AI Guidebook](https://pair.withgoogle.com/guidebook/) to ensure responsible AI implementation.
-
-By combining structured outputs with robust session management, developers can build complex, stateful AI applications that run entirely on the user's device.
-
-## 6. Fallback strategies
-
-LanguageModel has limited availability.
-Supported by: Chrome 148 (May 2026).
-Unsupported in: Edge, Firefox, and Safari.
-
-Before use, check if the LanguageModel object is available in the global scope:
-
-```js
-if ('LanguageModel' in self) {
- // The Prompt API is supported.
-} else {
- // Execute fallback strategy
-}
-```
-
-If the Prompt API is unsupported or availability checks return 'unavailable', you must gracefully fall back:
-
-* Remote API Fallback: Redirect the detection request to a server endpoint or a cloud API (such as the Vertex AI Gemini API).
-* Local API Fallback: Redirect the detection request to a local endpoint, for example, using Transformers.js.
diff --git a/skills/modern-web-guidance/guides/built-in-ai/translator.md b/skills/modern-web-guidance/guides/built-in-ai/translator.md
index 683d679..672ed9b 100644
--- a/skills/modern-web-guidance/guides/built-in-ai/translator.md
+++ b/skills/modern-web-guidance/guides/built-in-ai/translator.md
@@ -101,7 +101,7 @@ The API supports a wide range of BCP 47 language codes: Here are the languages s
- **hu**: Hungarian
- **id**: Indonesian
- **it**: Italian
-- **he**: Hebrew
+- **iw**: Hebrew
- **ja**: Japanese
- **kn**: Kannada
- **ko**: Korean
diff --git a/skills/modern-web-guidance/guides/css/css-layout.md b/skills/modern-web-guidance/guides/css-layout/css-layout.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/css-layout.md
rename to skills/modern-web-guidance/guides/css-layout/css-layout.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/highlight-text-ranges.md b/skills/modern-web-guidance/guides/css/highlight-text-ranges.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/highlight-text-ranges.md
rename to skills/modern-web-guidance/guides/css/highlight-text-ranges.md
diff --git a/skills/modern-web-guidance/guides/html/html.md b/skills/modern-web-guidance/guides/html/html.md
index e23f2e4..ac20516 100644
--- a/skills/modern-web-guidance/guides/html/html.md
+++ b/skills/modern-web-guidance/guides/html/html.md
@@ -139,7 +139,7 @@
- **DO** use the `<picture>` element with a fallback `<img>` for more fine-grained image control like switching between image formats, image sizes, and cropping images at different device sizes.
- **DON'T** apply `loading="lazy"` to above-the-fold or hero images. This delays LCP.
-- **DON'T** overuse `fetchpriority="high"`; prioritization is a zero-sum mechanism. Use `fetchpriority="low"` to demote non-critical trackers or carousel items.
+- **DON'T** overuse `fetchpriority="high"`; prioritization is a zero-sum mechanism. Use `fetchpriority="low"` to demote non-critical trackers or later carousel items.
### Code Example
diff --git a/skills/modern-web-guidance/guides/security/passkey-authentication.md b/skills/modern-web-guidance/guides/passkeys/passkey-authentication.md
similarity index 100%
rename from skills/modern-web-guidance/guides/security/passkey-authentication.md
rename to skills/modern-web-guidance/guides/passkeys/passkey-authentication.md
diff --git a/skills/modern-web-guidance/guides/security/passkey-conditional-create.md b/skills/modern-web-guidance/guides/passkeys/passkey-conditional-create.md
similarity index 100%
rename from skills/modern-web-guidance/guides/security/passkey-conditional-create.md
rename to skills/modern-web-guidance/guides/passkeys/passkey-conditional-create.md
diff --git a/skills/modern-web-guidance/guides/security/passkey-management.md b/skills/modern-web-guidance/guides/passkeys/passkey-management.md
similarity index 100%
rename from skills/modern-web-guidance/guides/security/passkey-management.md
rename to skills/modern-web-guidance/guides/passkeys/passkey-management.md
diff --git a/skills/modern-web-guidance/guides/security/passkey-reauthentication.md b/skills/modern-web-guidance/guides/passkeys/passkey-reauthentication.md
similarity index 100%
rename from skills/modern-web-guidance/guides/security/passkey-reauthentication.md
rename to skills/modern-web-guidance/guides/passkeys/passkey-reauthentication.md
diff --git a/skills/modern-web-guidance/guides/security/passkey-registration.md b/skills/modern-web-guidance/guides/passkeys/passkey-registration.md
similarity index 100%
rename from skills/modern-web-guidance/guides/security/passkey-registration.md
rename to skills/modern-web-guidance/guides/passkeys/passkey-registration.md
diff --git a/skills/modern-web-guidance/guides/security/passkeys.md b/skills/modern-web-guidance/guides/passkeys/passkeys.md
similarity index 100%
rename from skills/modern-web-guidance/guides/security/passkeys.md
rename to skills/modern-web-guidance/guides/passkeys/passkeys.md
diff --git a/skills/modern-web-guidance/guides/performance/optimize-image-priority.md b/skills/modern-web-guidance/guides/performance/optimize-image-priority.md
index 10fbd1c..c07bf3f 100644
--- a/skills/modern-web-guidance/guides/performance/optimize-image-priority.md
+++ b/skills/modern-web-guidance/guides/performance/optimize-image-priority.md
@@ -1,6 +1,10 @@
# Optimize image priority
-Browsers use heuristics to assign loading priorities to images, but these defaults may not always align with your page's Largest Contentful Paint (LCP). Using `fetchpriority` on an `<img>` element allows you to explicitly signal an image's importance to the browser, ensuring critical images load faster while non-essential ones don't compete for bandwidth.
+Browsers use heuristics to assign loading priorities to images, but these defaults may not always align with your page's Largest Contentful Paint (LCP).
+
+Using `fetchpriority` on an `<img>` element allows you to explicitly signal an image's importance to the browser, ensuring critical images load faster while non-essential ones don't compete for bandwidth.
+
+The `loading=lazy` attribute prevents images from being downloaded at all when sufficiently off-screen which can further help prioritize images.
## How to implement
@@ -20,10 +24,17 @@ Browsers use heuristics to assign loading priorities to images, but these defaul
width="800" height="400">
<!-- Deprioritize initially hidden images above the fold -->
-<img src="/images/gallery-alt.jpg"
- alt="Gallery Image"
- fetchpriority="low"
- width="400" height="300">
+<!-- Additionally use `loading="lazy"` if there are likely to be many images-->
+ <div class="carousel">
+ <img src="/images/gallery-alt.jpg"
+ alt="Gallery Image 1"
+ width="400" height="300">
+ <img src="/images/gallery-alt.jpg"
+ alt="Gallery Image 2"
+ fetchpriority="low"
+ loading="lazy"
+ width="400" height="300">
+<div>
<!-- Deprioritize images revealed only after user interaction -->
<img src="/images/mega-menu-promo.jpg"
@@ -50,8 +61,9 @@ Browsers use heuristics to assign loading priorities to images, but these defaul
- **MANDATORY**: Use `fetchpriority="low"` for images that are technically "above the fold" but initially hidden (e.g., hidden carousel slides, mega menu images).
- **MANDATORY**: **Do not** use `fetchpriority="low"` on standard below-the-fold images that are already using `loading="lazy"`. These images should load at normal priority once they enter the viewport.
- **RECOMMENDED**: Avoid using `fetchpriority="auto"`. If you want the default priority, omit the attribute entirely to keep your HTML clean.
-- **DO NOT** combine `fetchpriority="high"` with `loading="lazy"` for the LCP image.
+- **DO NOT** combine `fetchpriority="high"` with `loading="lazy"`.
- **DO NOT** use the deprecated `importance` attribute. It has been replaced by `fetchpriority` and is not supported by any browser.
+- **DO NOT** use the deprecated `loading="auto"` value. It was initially supported by Chrome but has been removed and is not supported by any browser.
## Fallback strategy
diff --git a/skills/modern-web-guidance/guides/performance/performance.md b/skills/modern-web-guidance/guides/performance/performance.md
index ded9ec2..a1469d4 100644
--- a/skills/modern-web-guidance/guides/performance/performance.md
+++ b/skills/modern-web-guidance/guides/performance/performance.md
@@ -50,10 +50,10 @@ The Critical Rendering Path dictates how quickly the browser converts HTML, CSS,
LCP measures the time required to render the largest visible text or image block within the viewport. Optimize LCP by prioritizing visible elements and prepolishing.
### DOs
-* **DO use `fetchpriority="high"` on the LCP image**: Signal to the browser's heuristic engine to elevate the image's priority above scripts and non-critical assets.
-* **DO declare the LCP image in standard HTML**: Ensure the `<img>` tag is present in the raw HTML response so the preload scanner discovers it immediately. Avoid relying on JavaScript to mount the LCP element.
-* **DO preload background images acting as LCP**: If the LCP element is a CSS `background-image`, force early discovery using `<link rel="preload" as="image">` coupled with `fetchpriority="high"`.
-* **DO use `fetchpriority="low"` to demote competing elements**: Lower the priority of large images or carousels that appear above the fold but are *not* the primary LCP element.
+* **DO declare the LCP image in standard HTML**: Ensure LCP images are present in the raw HTML response so the preload scanner discovers it immediately. This can be be via an `<img>` element (preferred) or a `<link rel="preload" as="image">` (where the image resource is loaded due to JavaScript or CSS). Avoid relying on JavaScript or CSS to be the only source of the image resource.
+* **DO use `fetchpriority="high"` on the LCP images**: Images are not downloaded initially while the browser prioritizes render-blocking resources like CSS and JavaScript and can perform layout to discover if the images are in the viewport or not. Use `fetchpriority="high"` to signal to the browser's heuristic engine to start downloading the LCP image earlier. This should be on the `<img>` element (`<img fetchpriority="high">`) and any preload (`<link rel="preload" as="image" fetchpriority="high">`).
+* **DO use `fetchpriority="low"` to demote competing elements that are not in the initial viewport**: Lower the priority of large images or carousels that are *not* the primary LCP element and do *not* appear in the initial viewport, but may still be downloaded if near the viewport or hidden with CSS (for example `overflow:scroll` for carousels). Images with `fetchpriority="low"` will still be downloaded but start after higher-priority resources the browser has queued.
+* **DO use `loading="lazy"` to avoid loading competing elements that are far out of the initial viewport**: Images, iframes, and video and audio media which are well outside of the viewport should be lazy-loaded to avoid fetching these at all. Images with `loading="lazy"` will not be downloaded at all when well outside the viewport but will download when in, or near, the viewport (depending on browser heuristics and connection settings),.
### DON'Ts
* **DON'T lazy-load the LCP image**: Never apply `loading="lazy"` to above-the-fold images. This purposefully delays the fetch until layout calculation is complete, severely degrading LCP.
@@ -69,7 +69,6 @@ LCP measures the time required to render the largest visible text or image block
src="/images/hero.webp"
alt="Hero Product"
fetchpriority="high"
- decoding="sync"
width="1200"
height="600"
>
@@ -78,7 +77,7 @@ LCP measures the time required to render the largest visible text or image block
<link rel="preload" as="image" href="/images/bg-hero.webp" fetchpriority="high" type="image/webp">
<!-- Demoting an above-the-fold non-LCP carousel image -->
-<img src="/images/carousel-2.webp" fetchpriority="low" alt="Slide 2">
+<img src="/images/carousel-2.webp" fetchpriority="low" loading="lazy" alt="Slide 2">
```
## Interaction to Next Paint (INP) & Main Thread Unblocking
@@ -92,7 +91,7 @@ INP measures the latency of all interactive events across the page's lifecycle.
* **DO separate UI updates from heavy computations**: Update the UI synchronously to provide immediate visual feedback, then push background processing to a Web Worker or deferred task.
### DON'Ts
-* **DON'T rely solely on `setTimeout(..., 0)` for continuous yielding**: Standard `setTimeout` places continuations at the *back* of the task queue, potentially causing long delays if other tasks are pending.
+* **DON'T rely solely on `setTimeout(..., 0)` for continuous yielding**: Standard `setTimeout` places continuations at the *back* of the task queue, potentially causing long delays if other tasks are pending. Use `scheduler.yield()` where available.
* **DON'T cause layout thrashing**: Avoid interleaving DOM reads (`offsetHeight`, `getBoundingClientRect`) and writes (`style.height`) within the same loop. Batch DOM reads, then batch DOM writes.
* **DON'T block the thread with recurring timers**: Avoid heavy polling with `setInterval` that starves the main thread.
@@ -288,11 +287,12 @@ registerRoute(
Web fonts are a common source of render blocking. Optimizing them reduces the Flash of Invisible Text (FOIT) and speeds up initial rendering.
### DOs
-* **DO preload critical fonts**: Use `<link rel="preload" as="font" type="font/woff2" crossorigin>` for fonts seen above the fold.
+* **DO preload critical fonts**: Use `<link rel="preload" as="font" type="font/woff2" crossorigin>` for fonts seen above the fold. Do include the `crossorigin` attribute for all fonts (even same origin fonts).
* **DO subset fonts**: Trim font weights and glyph variations to include only the characters your application requires.
### DON'Ts
* **DON'T preload all fonts**: Over-preloading leads to network contention that starves other critical assets.
+* **DON'T use `fetchpriority="high"` on fonts**: Fonts are loaded with a high priority by default so there is no need to specify `fetchpriority="high"`.
### Code Examples
@@ -317,6 +317,7 @@ Video payloads are among the heaviest assets. Optimization focuses on reducing b
### DOs
* **DO specify explicit `width` and `height` attributes**: Setting native dimensions reserves layout space and prevents CLS.
* **DO provide a `poster` image fallback**: Display a lightweight image placeholder while the video buffers to improve perceived performance.
+* **DO use `<link rel="preload" as="image" fetchpriority="high">` for poster images where the video is the LCP element**: This ensures the image is downloaded as quickly as possible.
* **DO use `preload="none"` for non-critical videos**: Delay bandwidth consumption for below-the-fold or non-autoplaying videos.
* **DO serve modern formats via source negotiation**: Offer WebM (better compression ratio) alongside standard MP4 formats.
* **DO use `loading="lazy"` for offscreen videos**: Lazy-loading videos allow `poster` and `preload` downloads to be deferred until the video is in or near the viewport.
@@ -335,6 +336,7 @@ Video payloads are among the heaviest assets. Optimization focuses on reducing b
height="675"
poster="/images/video-poster.webp"
preload="none"
+ loading="lazy"
>
<source src="/videos/intro.webm" type="video/webm">
<source src="/videos/intro.mp4" type="video/mp4">
diff --git a/skills/modern-web-guidance/guides/ui-components/persistent-toast-notifications.md b/skills/modern-web-guidance/guides/ui-components/persistent-toast-notifications.md
deleted file mode 100644
index b188517..0000000
--- a/skills/modern-web-guidance/guides/ui-components/persistent-toast-notifications.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Creating Toast Notifications
-
-Toast notifications are transient status messages. Unlike menus, they should not close when a user interacts with other parts of the page. The popover="manual" state is ideal because it lacks "light-dismiss" behavior and allows multiple notifications to coexist.
-
-### Implementation Guidelines
-
-* **MANDATORY:** Use popover="manual" so the notification stays visible until explicitly closed or timed out by a script.
-* **DO** use a container to manage the stacking of multiple toasts. Since popovers in the Top Layer ignore parent z-index, you must position them individually or within a common layout group.
-* **DO** use sibling-index() to add margin between toast notifications so that items lower in the stack are visible.
-* **DO** provide an explicit "Close" button within the toast using popovertargetaction="hide".
-* **DO** use JavaScript for auto-dismissal timers (e.g., calling hidePopover() after 3000ms).
-* **DO** utilize transition-behavior: allow-discrete to animate the entry and exit from the Top Layer.
-
-### Fallback Strategies
-
-### Fallbacks & browser support for Popover
-
-Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
-Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
-
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
-
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
-
-With a bundler or import map:
-
-```js
-// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
-}
-```
-
-Without a bundler, import from a CDN inside a `<script type="module">`:
-
-```html
-<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
- }
-</script>
-```
-
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
-
-```css
-[popover]:is(:popover-open, .\:popover-open) {
- display: block;
-}
-```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
-
-#### sibling-index()
-
-* **Guidance:** If sibling-index() is not supported, use the `+` operator to add margin manually. I.e. `popover + popover { margin-top: 1rem }`
-
-#### anchor-positioning
-
-* **Guidance:** Use the [CSS Anchor Positioning Polyfill](https://github.com/oddbird/css-anchor-positioning). For a non-polyfill fallback, default the tooltip to a fixed position at the bottom of the viewport using `@supports not (anchor-name: --foo)`.
-
-#### transition-behavior
-
-* **Guidance:** If transition-behavior is not supported, use JavaScript to add animation via classes as the toast element transitions in and out.
\ No newline at end of file
diff --git a/skills/modern-web-guidance/guides/visual-design/adapt-scrollbar-to-contrast-preferences.md b/skills/modern-web-guidance/guides/user-experience/adapt-scrollbar-to-contrast-preferences.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/adapt-scrollbar-to-contrast-preferences.md
rename to skills/modern-web-guidance/guides/user-experience/adapt-scrollbar-to-contrast-preferences.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md b/skills/modern-web-guidance/guides/user-experience/anchor-positioning-tab-underline.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md
rename to skills/modern-web-guidance/guides/user-experience/anchor-positioning-tab-underline.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/animate-element-entry-exit.md b/skills/modern-web-guidance/guides/user-experience/animate-element-entry-exit.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/animate-element-entry-exit.md
rename to skills/modern-web-guidance/guides/user-experience/animate-element-entry-exit.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md b/skills/modern-web-guidance/guides/user-experience/animate-to-from-top-layer.md
similarity index 75%
rename from skills/modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md
rename to skills/modern-web-guidance/guides/user-experience/animate-to-from-top-layer.md
index 274ff28..f5f4bd7 100644
--- a/skills/modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md
+++ b/skills/modern-web-guidance/guides/user-experience/animate-to-from-top-layer.md
@@ -96,7 +96,7 @@ dialog[open]::backdrop,
## Fallback strategies
-### Top-layer animation features
+#### Top-layer animation features
Baseline status for @starting-style: Newly available. It's been Baseline since 2024-08-06.
Supported by: Chrome 117 (Sep 2023), Edge 117 (Sep 2023), Firefox 129 (Aug 2024), and Safari 17.5 (May 2024).
@@ -122,40 +122,19 @@ if (!supportsTopLayerAnimation) {
}
```
-### Fallbacks & browser support for Popover
+#### popover
Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
-
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
-
-With a bundler or import map:
-
-```js
-// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
-}
-```
-
-Without a bundler, import from a CDN inside a `<script type="module">`:
+If the browser does not support Popover, use the `@oddbird/popover-polyfill`:
```html
<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
+ if (!HTMLElement.prototype.hasOwnProperty('popover')) {
+ await import('https://unpkg.com/@oddbird/popover-polyfill');
}
</script>
```
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
-
-```css
-[popover]:is(:popover-open, .\:popover-open) {
- display: block;
-}
-```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
+Alternatively, for legacy support without a polyfill, use `position: fixed` and manually calculate coordinates via JavaScript `getBoundingClientRect()`.
diff --git a/skills/modern-web-guidance/guides/css/animate-to-intrinsic-sizes.md b/skills/modern-web-guidance/guides/user-experience/animate-to-intrinsic-sizes.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/animate-to-intrinsic-sizes.md
rename to skills/modern-web-guidance/guides/user-experience/animate-to-intrinsic-sizes.md
diff --git a/skills/modern-web-guidance/guides/visual-design/apply-webgl-shaders.md b/skills/modern-web-guidance/guides/user-experience/apply-webgl-shaders.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/apply-webgl-shaders.md
rename to skills/modern-web-guidance/guides/user-experience/apply-webgl-shaders.md
diff --git a/skills/modern-web-guidance/guides/js/calculate-event-differentials.md b/skills/modern-web-guidance/guides/user-experience/calculate-event-differentials.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/calculate-event-differentials.md
rename to skills/modern-web-guidance/guides/user-experience/calculate-event-differentials.md
diff --git a/skills/modern-web-guidance/guides/css/calculate-with-intrinsic-sizes.md b/skills/modern-web-guidance/guides/user-experience/calculate-with-intrinsic-sizes.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/calculate-with-intrinsic-sizes.md
rename to skills/modern-web-guidance/guides/user-experience/calculate-with-intrinsic-sizes.md
diff --git a/skills/modern-web-guidance/guides/js/capture-location-agnostic-data.md b/skills/modern-web-guidance/guides/user-experience/capture-location-agnostic-data.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/capture-location-agnostic-data.md
rename to skills/modern-web-guidance/guides/user-experience/capture-location-agnostic-data.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/carousel-slide-effects.md b/skills/modern-web-guidance/guides/user-experience/carousel-slide-effects.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/carousel-slide-effects.md
rename to skills/modern-web-guidance/guides/user-experience/carousel-slide-effects.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/carousel-snap-highlights.md b/skills/modern-web-guidance/guides/user-experience/carousel-snap-highlights.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/carousel-snap-highlights.md
rename to skills/modern-web-guidance/guides/user-experience/carousel-snap-highlights.md
diff --git a/skills/modern-web-guidance/guides/css/child-state-based-styling.md b/skills/modern-web-guidance/guides/user-experience/child-state-based-styling.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/child-state-based-styling.md
rename to skills/modern-web-guidance/guides/user-experience/child-state-based-styling.md
diff --git a/skills/modern-web-guidance/guides/visual-design/complex-shapes.md b/skills/modern-web-guidance/guides/user-experience/complex-shapes.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/complex-shapes.md
rename to skills/modern-web-guidance/guides/user-experience/complex-shapes.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/component-specific-light-dark-theme.md b/skills/modern-web-guidance/guides/user-experience/component-specific-light-dark-theme.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/component-specific-light-dark-theme.md
rename to skills/modern-web-guidance/guides/user-experience/component-specific-light-dark-theme.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/consistent-cross-document-transitions.md b/skills/modern-web-guidance/guides/user-experience/consistent-cross-document-transitions.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/consistent-cross-document-transitions.md
rename to skills/modern-web-guidance/guides/user-experience/consistent-cross-document-transitions.md
diff --git a/skills/modern-web-guidance/guides/css/content-based-styling.md b/skills/modern-web-guidance/guides/user-experience/content-based-styling.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/content-based-styling.md
rename to skills/modern-web-guidance/guides/user-experience/content-based-styling.md
diff --git a/skills/modern-web-guidance/guides/js/coordinate-global-events.md b/skills/modern-web-guidance/guides/user-experience/coordinate-global-events.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/coordinate-global-events.md
rename to skills/modern-web-guidance/guides/user-experience/coordinate-global-events.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/cross-document-transitions.md b/skills/modern-web-guidance/guides/user-experience/cross-document-transitions.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/cross-document-transitions.md
rename to skills/modern-web-guidance/guides/user-experience/cross-document-transitions.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/custom-button-actions.md b/skills/modern-web-guidance/guides/user-experience/custom-button-actions.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/custom-button-actions.md
rename to skills/modern-web-guidance/guides/user-experience/custom-button-actions.md
diff --git a/skills/modern-web-guidance/guides/visual-design/customize-scrollbar-color-and-thickness.md b/skills/modern-web-guidance/guides/user-experience/customize-scrollbar-color-and-thickness.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/customize-scrollbar-color-and-thickness.md
rename to skills/modern-web-guidance/guides/user-experience/customize-scrollbar-color-and-thickness.md
diff --git a/skills/modern-web-guidance/guides/visual-design/dark-mode.md b/skills/modern-web-guidance/guides/user-experience/dark-mode.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/dark-mode.md
rename to skills/modern-web-guidance/guides/user-experience/dark-mode.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md b/skills/modern-web-guidance/guides/user-experience/declarative-dialog-popover-control.md
similarity index 85%
rename from skills/modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md
rename to skills/modern-web-guidance/guides/user-experience/declarative-dialog-popover-control.md
index e6d6e7d..9b56bcc 100644
--- a/skills/modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md
+++ b/skills/modern-web-guidance/guides/user-experience/declarative-dialog-popover-control.md
@@ -64,6 +64,8 @@ Unlike popovers, modal dialogs typically use separate buttons for opening and cl
Baseline status for Invoker commands: Newly available. It's been Baseline since 2025-12-12.
Supported by: Chrome 135 (Apr 2025), Edge 135 (Apr 2025), Firefox 144 (Oct 2025), and Safari 26.2 (Dec 2025).
+Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
+Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
Because Invoker Commands and Popovers are not yet universally supported, you MUST use polyfills as fallbacks for older browsers.
@@ -193,40 +195,44 @@ document.getElementById('action-target').addEventListener('command', (event) =>
});
```
-### Fallbacks & browser support for Popover
-
-Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
-Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
+### Polyfilling the Popover Attribute
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
+To support the `popover` attribute in older browsers, use the `@oddbird/popover-polyfill`.
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
+MANDATORY: Feature detect popover support by checking for the `popover` property on the `HTMLElement` prototype. Conditionally initialize the polyfill only if native support is missing.
-With a bundler or import map:
+**Option 1: Using a bundler**
+Install the package via npm (`npm install @oddbird/popover-polyfill`). This method requires a bundler or import maps to resolve the module path.
-```js
+```javascript
// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
+if (!('popover' in HTMLElement.prototype)) {
+ import('@oddbird/popover-polyfill/fn').then(({ apply }) => {
+ apply();
+ });
}
```
-Without a bundler, import from a CDN inside a `<script type="module">`:
+**Option 2: Using a CDN**
+For projects without a bundler, dynamically import the polyfill directly from a CDN inside a `<script type="module">`.
```html
<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
+ // MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
+ // Conditionally load the popover-polyfill from a CDN only in browsers lacking native support.
+ if (!('popover' in HTMLElement.prototype)) {
+ import('https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover-fn.js').then(({ apply }) => {
+ apply();
+ });
}
</script>
```
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
+**Popover Polyfill Limitations & Styling Caveats**
+MANDATORY: Use `:is()` or `:where()` to combine `:popover-open` with the corresponding polyfill class, otherwise browsers that do not support `:popover-open` will throw away the entire rule.
```css
[popover]:is(:popover-open, .\:popover-open) {
display: block;
}
```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
diff --git a/skills/modern-web-guidance/guides/performance/deliver-optimized-decorative-images.md b/skills/modern-web-guidance/guides/user-experience/deliver-optimized-decorative-images.md
similarity index 100%
rename from skills/modern-web-guidance/guides/performance/deliver-optimized-decorative-images.md
rename to skills/modern-web-guidance/guides/user-experience/deliver-optimized-decorative-images.md
diff --git a/skills/modern-web-guidance/guides/css/design-token-reactivity.md b/skills/modern-web-guidance/guides/user-experience/design-token-reactivity.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/design-token-reactivity.md
rename to skills/modern-web-guidance/guides/user-experience/design-token-reactivity.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/directional-navigation-transitions.md b/skills/modern-web-guidance/guides/user-experience/directional-navigation-transitions.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/directional-navigation-transitions.md
rename to skills/modern-web-guidance/guides/user-experience/directional-navigation-transitions.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md b/skills/modern-web-guidance/guides/user-experience/dynamic-sibling-animations.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md
rename to skills/modern-web-guidance/guides/user-experience/dynamic-sibling-animations.md
diff --git a/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md b/skills/modern-web-guidance/guides/user-experience/dynamic-sibling-styling.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md
rename to skills/modern-web-guidance/guides/user-experience/dynamic-sibling-styling.md
diff --git a/skills/modern-web-guidance/guides/visual-design/export-html-media-from-canvas.md b/skills/modern-web-guidance/guides/user-experience/export-html-media-from-canvas.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/export-html-media-from-canvas.md
rename to skills/modern-web-guidance/guides/user-experience/export-html-media-from-canvas.md
diff --git a/skills/modern-web-guidance/guides/visual-design/expose-canvas-content-to-browser-features.md b/skills/modern-web-guidance/guides/user-experience/expose-canvas-content-to-browser-features.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/expose-canvas-content-to-browser-features.md
rename to skills/modern-web-guidance/guides/user-experience/expose-canvas-content-to-browser-features.md
diff --git a/skills/modern-web-guidance/guides/performance/flicker-free-client-side-ab-testing.md b/skills/modern-web-guidance/guides/user-experience/flicker-free-client-side-ab-testing.md
similarity index 100%
rename from skills/modern-web-guidance/guides/performance/flicker-free-client-side-ab-testing.md
rename to skills/modern-web-guidance/guides/user-experience/flicker-free-client-side-ab-testing.md
diff --git a/skills/modern-web-guidance/guides/css/fluid-scaling.md b/skills/modern-web-guidance/guides/user-experience/fluid-scaling.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/fluid-scaling.md
rename to skills/modern-web-guidance/guides/user-experience/fluid-scaling.md
diff --git a/skills/modern-web-guidance/guides/js/format-human-readable-durations.md b/skills/modern-web-guidance/guides/user-experience/format-human-readable-durations.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/format-human-readable-durations.md
rename to skills/modern-web-guidance/guides/user-experience/format-human-readable-durations.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/group-element-transitions.md b/skills/modern-web-guidance/guides/user-experience/group-element-transitions.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/group-element-transitions.md
rename to skills/modern-web-guidance/guides/user-experience/group-element-transitions.md
diff --git a/skills/modern-web-guidance/guides/visual-design/improve-text-layout-and-legibility.md b/skills/modern-web-guidance/guides/user-experience/improve-text-layout-and-legibility.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/improve-text-layout-and-legibility.md
rename to skills/modern-web-guidance/guides/user-experience/improve-text-layout-and-legibility.md
diff --git a/skills/modern-web-guidance/guides/css/individual-transform-properties.md b/skills/modern-web-guidance/guides/user-experience/individual-transform-properties.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/individual-transform-properties.md
rename to skills/modern-web-guidance/guides/user-experience/individual-transform-properties.md
diff --git a/skills/modern-web-guidance/guides/visual-design/interactive-content-in-3d-scenes.md b/skills/modern-web-guidance/guides/user-experience/interactive-content-in-3d-scenes.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/interactive-content-in-3d-scenes.md
rename to skills/modern-web-guidance/guides/user-experience/interactive-content-in-3d-scenes.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/interactive-content-reveal.md b/skills/modern-web-guidance/guides/user-experience/interactive-content-reveal.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/interactive-content-reveal.md
rename to skills/modern-web-guidance/guides/user-experience/interactive-content-reveal.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-action-previews.md b/skills/modern-web-guidance/guides/user-experience/interest-triggered-action-previews.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-action-previews.md
rename to skills/modern-web-guidance/guides/user-experience/interest-triggered-action-previews.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md b/skills/modern-web-guidance/guides/user-experience/interest-triggered-tooltips.md
similarity index 77%
rename from skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md
rename to skills/modern-web-guidance/guides/user-experience/interest-triggered-tooltips.md
index f708f4b..09ebe5d 100644
--- a/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md
+++ b/skills/modern-web-guidance/guides/user-experience/interest-triggered-tooltips.md
@@ -88,50 +88,22 @@ Interest invokers must be conditionally polyfilled using the `interestfor` polyf
</script>
```
-### Fallbacks & browser support for Popover
-
Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
+popover="hint" has limited availability.
+Supported by: Chrome 133 (Feb 2025), Edge 133 (Feb 2025), and Firefox 149 (Mar 2026).
+Unsupported in: Safari.
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
-
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
-
-With a bundler or import map:
-
-```js
-// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
-}
-```
-
-Without a bundler, import from a CDN inside a `<script type="module">`:
+Popover and popover hint must conditionally be polyfilled with the `@oddbird/popover-polyfill` polyfill. The hint behavior will not be polyfilled in browsers that support `popover` but not `popover="hint"`. For those browsers, a tooltip opened via focus may stay open when a second tooltip opened via hover.
```html
<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
+ if(!HTMLElement.prototype.hasOwnProperty("popover")){
+ await import("https://unpkg.com/@oddbird/popover-polyfill@latest");
}
</script>
```
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
-
-```css
-[popover]:is(:popover-open, .\:popover-open) {
- display: block;
-}
-```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
-
-popover="hint" has limited availability.
-Supported by: Chrome 133 (Feb 2025), Edge 133 (Feb 2025), and Firefox 149 (Mar 2026).
-Unsupported in: Safari.
-
-The `popover-polyfill` does not polyfill the hint behavior in browsers that support `popover` but not `popover="hint"`. For those browsers, a tooltip opened via focus may stay open when a second tooltip opened via hover.
-
Anchor positioning is not natively supported by any major browser yet.
**MANDATORY:** To support browsers without anchor positioning, you MUST use the `@oddbird/css-anchor-positioning` polyfill. It does not support implicit anchors, so you MUST add anchor names to the trigger. Additionally, `position-area` is not supported on popovers by the polyfill, so you MUST use `anchor()` on the desired insets.
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/light-dismiss-a-dialog.md b/skills/modern-web-guidance/guides/user-experience/light-dismiss-a-dialog.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/light-dismiss-a-dialog.md
rename to skills/modern-web-guidance/guides/user-experience/light-dismiss-a-dialog.md
diff --git a/skills/modern-web-guidance/guides/js/manage-recurring-intervals.md b/skills/modern-web-guidance/guides/user-experience/manage-recurring-intervals.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/manage-recurring-intervals.md
rename to skills/modern-web-guidance/guides/user-experience/manage-recurring-intervals.md
diff --git a/skills/modern-web-guidance/guides/js/model-partial-time-concepts.md b/skills/modern-web-guidance/guides/user-experience/model-partial-time-concepts.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/model-partial-time-concepts.md
rename to skills/modern-web-guidance/guides/user-experience/model-partial-time-concepts.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/move-dom-element-without-losing-state.md b/skills/modern-web-guidance/guides/user-experience/move-dom-element-without-losing-state.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/move-dom-element-without-losing-state.md
rename to skills/modern-web-guidance/guides/user-experience/move-dom-element-without-losing-state.md
diff --git a/skills/modern-web-guidance/guides/ui-components/navigation-drawer.md b/skills/modern-web-guidance/guides/user-experience/navigation-drawer.md
similarity index 98%
rename from skills/modern-web-guidance/guides/ui-components/navigation-drawer.md
rename to skills/modern-web-guidance/guides/user-experience/navigation-drawer.md
index 7ace641..ccbebe3 100644
--- a/skills/modern-web-guidance/guides/ui-components/navigation-drawer.md
+++ b/skills/modern-web-guidance/guides/user-experience/navigation-drawer.md
@@ -287,6 +287,9 @@ document.addEventListener('keydown', (event) => {
### Fallback strategies
+Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
+Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
+
The drawer's core mechanics — scroll snap, `IntersectionObserver`, and `inert` — are all Baseline Widely available and required for the component to function. The popover API, the scroll-driven animation that fades the backdrop, and `scroll-initial-target` are progressive enhancements with simple fallbacks that can be easily implemented if wide browser support is required.
#### Backdrop fade fallback (no `animation-timeline` support):
diff --git a/skills/modern-web-guidance/guides/css/overflow-clipping-control.md b/skills/modern-web-guidance/guides/user-experience/overflow-clipping-control.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/overflow-clipping-control.md
rename to skills/modern-web-guidance/guides/user-experience/overflow-clipping-control.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/parallax-scroll-effects.md b/skills/modern-web-guidance/guides/user-experience/parallax-scroll-effects.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/parallax-scroll-effects.md
rename to skills/modern-web-guidance/guides/user-experience/parallax-scroll-effects.md
diff --git a/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md b/skills/modern-web-guidance/guides/user-experience/persistent-app-tours.md
similarity index 68%
rename from skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md
rename to skills/modern-web-guidance/guides/user-experience/persistent-app-tours.md
index 3d6d8fa..7ae6bb2 100644
--- a/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md
+++ b/skills/modern-web-guidance/guides/user-experience/persistent-app-tours.md
@@ -54,43 +54,20 @@ tourStep.querySelector('button').focus();
### Fallback strategies
-### Fallbacks & browser support for Popover
-
Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
-
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
-
-With a bundler or import map:
-
-```js
-// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
-}
-```
-
-Without a bundler, import from a CDN inside a `<script type="module">`:
+If the browser does not support Popover, use the `@oddbird/popover-polyfill`:
```html
<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
+ if (!HTMLElement.prototype.hasOwnProperty('popover')) {
+ await import('https://unpkg.com/@oddbird/popover-polyfill');
}
</script>
```
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
-
-```css
-[popover]:is(:popover-open, .\:popover-open) {
- display: block;
-}
-```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
+Alternatively, for legacy support without a polyfill, use `position: fixed` and manually calculate coordinates via JavaScript `getBoundingClientRect()`.
#### anchor-positioning
diff --git a/skills/modern-web-guidance/guides/user-experience/persistent-toast-notifications.md b/skills/modern-web-guidance/guides/user-experience/persistent-toast-notifications.md
new file mode 100644
index 0000000..51d8492
--- /dev/null
+++ b/skills/modern-web-guidance/guides/user-experience/persistent-toast-notifications.md
@@ -0,0 +1,30 @@
+# Creating Toast Notifications
+
+Toast notifications are transient status messages. Unlike menus, they should not close when a user interacts with other parts of the page. The popover="manual" state is ideal because it lacks "light-dismiss" behavior and allows multiple notifications to coexist.
+
+### Implementation Guidelines
+
+* **MANDATORY:** Use popover="manual" so the notification stays visible until explicitly closed or timed out by a script.
+* **DO** use a container to manage the stacking of multiple toasts. Since popovers in the Top Layer ignore parent z-index, you must position them individually or within a common layout group.
+* **DO** use sibling-index() to add margin between toast notifications so that items lower in the stack are visible.
+* **DO** provide an explicit "Close" button within the toast using popovertargetaction="hide".
+* **DO** use JavaScript for auto-dismissal timers (e.g., calling hidePopover() after 3000ms).
+* **DO** utilize transition-behavior: allow-discrete to animate the entry and exit from the Top Layer.
+
+### Fallback Strategies
+
+#### popover
+
+* **Guidance:** Use the [Popover Polyfill](https://github.com/oddbird/popover-polyfill). For legacy browsers, fall back to a fixed-position div with a high z-index.
+
+#### sibling-index()
+
+* **Guidance:** If sibling-index() is not supported, use the `+` operator to add margin manually. I.e. `popover + popover { margin-top: 1rem }`
+
+#### anchor-positioning
+
+* **Guidance:** Use the [CSS Anchor Positioning Polyfill](https://github.com/oddbird/css-anchor-positioning). For a non-polyfill fallback, default the tooltip to a fixed position at the bottom of the viewport using `@supports not (anchor-name: --foo)`.
+
+#### transition-behavior
+
+* **Guidance:** If transition-behavior is not supported, use JavaScript to add animation via classes as the toast element transitions in and out.
\ No newline at end of file
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/persistent-top-layer-ui.md b/skills/modern-web-guidance/guides/user-experience/persistent-top-layer-ui.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/persistent-top-layer-ui.md
rename to skills/modern-web-guidance/guides/user-experience/persistent-top-layer-ui.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/physics-based-easing.md b/skills/modern-web-guidance/guides/user-experience/physics-based-easing.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/physics-based-easing.md
rename to skills/modern-web-guidance/guides/user-experience/physics-based-easing.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/platform-controls-dismiss-dialog.md b/skills/modern-web-guidance/guides/user-experience/platform-controls-dismiss-dialog.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/platform-controls-dismiss-dialog.md
rename to skills/modern-web-guidance/guides/user-experience/platform-controls-dismiss-dialog.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md b/skills/modern-web-guidance/guides/user-experience/position-aware-tooltips.md
similarity index 75%
rename from skills/modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md
rename to skills/modern-web-guidance/guides/user-experience/position-aware-tooltips.md
index ded9b70..99790b8 100644
--- a/skills/modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md
+++ b/skills/modern-web-guidance/guides/user-experience/position-aware-tooltips.md
@@ -115,42 +115,40 @@ Positioning the arrow based on the applied fallback is a progressive enhancement
}
```
-### Fallbacks & browser support for Popover
+### Polyfilling the Popover Attribute
Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
+To support the `popover` attribute in older browsers, use the `@oddbird/popover-polyfill`.
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
+MANDATORY: Feature detect popover support by checking for the `popover` property on the `HTMLElement` prototype. Conditionally initialize the polyfill only if native support is missing.
-With a bundler or import map:
+**Option 1: Using a package manager**
+Install the package (`npm install @oddbird/popover-polyfill`).
-```js
+```javascript
// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
+if (!('popover' in HTMLElement.prototype)) {
+ import('@oddbird/popover-polyfill/fn').then(({ apply }) => {
+ apply();
+ });
}
```
-Without a bundler, import from a CDN inside a `<script type="module">`:
+**Option 2: Manual installation without npm**
+If you are not using a package manager, dynamically import the polyfill directly from a CDN (such as unpkg) inside a `<script type="module">`.
```html
<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
+ // MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
+ // Conditionally load the popover-polyfill from a CDN only in browsers lacking native support.
+ if (!('popover' in HTMLElement.prototype)) {
+ import('https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover-fn.js').then(({ apply }) => {
+ apply();
+ });
}
</script>
```
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
-
-```css
-[popover]:is(:popover-open, .\:popover-open) {
- display: block;
-}
-```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
-
Browsers without support for the Popover API also do not support anchor positioning, so the tooltip will appear in the center of the screen.
\ No newline at end of file
diff --git a/skills/modern-web-guidance/guides/visual-design/precise-text-alignment.md b/skills/modern-web-guidance/guides/user-experience/precise-text-alignment.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/precise-text-alignment.md
rename to skills/modern-web-guidance/guides/user-experience/precise-text-alignment.md
diff --git a/skills/modern-web-guidance/guides/visual-design/prevent-text-wrapping.md b/skills/modern-web-guidance/guides/user-experience/prevent-text-wrapping.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/prevent-text-wrapping.md
rename to skills/modern-web-guidance/guides/user-experience/prevent-text-wrapping.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/pull-to-reveal.md b/skills/modern-web-guidance/guides/user-experience/pull-to-reveal.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/pull-to-reveal.md
rename to skills/modern-web-guidance/guides/user-experience/pull-to-reveal.md
diff --git a/skills/modern-web-guidance/guides/css/reduce-style-repetition.md b/skills/modern-web-guidance/guides/user-experience/reduce-style-repetition.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/reduce-style-repetition.md
rename to skills/modern-web-guidance/guides/user-experience/reduce-style-repetition.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md b/skills/modern-web-guidance/guides/user-experience/resilient-context-menus-and-nested-dropdowns.md
similarity index 74%
rename from skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md
rename to skills/modern-web-guidance/guides/user-experience/resilient-context-menus-and-nested-dropdowns.md
index 6dc1fa1..df36255 100644
--- a/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md
+++ b/skills/modern-web-guidance/guides/user-experience/resilient-context-menus-and-nested-dropdowns.md
@@ -60,44 +60,19 @@ To prevent the panel from being cut off at the edge of the screen, define "try t
## Fallback strategies
-### Fallbacks & browser support for Popover
-
Baseline status for Popover: Newly available. It's been Baseline since 2025-01-27.
Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).
-The Popover API is mostly **progressive enhancement**, but its defining behaviors — top-layer promotion, light-dismiss, and `popovertarget` invocation — have no CSS-only equivalent. Older browsers need a polyfill, or a manual fallback if you would rather not ship one.
-
-**Polyfill:** To support the `popover` attribute in older browsers, conditionally load [`@oddbird/popover-polyfill`](https://github.com/oddbird/popover-polyfill). **MANDATORY:** Feature detect by checking for the `popover` property on `HTMLElement.prototype`, and load the polyfill **only** when native support is missing — do NOT load it unconditionally.
-
-With a bundler or import map:
-
-```js
-// MANDATORY: Feature detect 'popover' on HTMLElement.prototype.
-if (!("popover" in HTMLElement.prototype)) {
- import("@oddbird/popover-polyfill");
-}
-```
-
-Without a bundler, import from a CDN inside a `<script type="module">`:
+Popover must conditionally be polyfilled with the `@oddbird/popover-polyfill` polyfill.
```html
<script type="module">
- if (!("popover" in HTMLElement.prototype)) {
- import("https://unpkg.com/@oddbird/popover-polyfill@latest/dist/popover.min.js");
+ if(!HTMLElement.prototype.hasOwnProperty("popover")){
+ await import("https://unpkg.com/@oddbird/popover-polyfill@latest");
}
</script>
```
-**Styling caveat:** The polyfill cannot define the real `:popover-open` pseudo-class, so it applies a `.\:popover-open` class instead. **MANDATORY:** Combine the two with `:is()` or `:where()`, otherwise browsers that lack `:popover-open` discard the entire rule:
-
-```css
-[popover]:is(:popover-open, .\:popover-open) {
- display: block;
-}
-```
-
-Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.
-
Anchor positioning is not natively supported by any major browser yet.
To support browsers without anchor positioning, you must set a reasonable position. By default popovers are centered in the middle of the screen, which may work for your use case.
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/same-document-transitions.md b/skills/modern-web-guidance/guides/user-experience/same-document-transitions.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/same-document-transitions.md
rename to skills/modern-web-guidance/guides/user-experience/same-document-transitions.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/scroll-entry-exit-effects.md b/skills/modern-web-guidance/guides/user-experience/scroll-entry-exit-effects.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/scroll-entry-exit-effects.md
rename to skills/modern-web-guidance/guides/user-experience/scroll-entry-exit-effects.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/scroll-position-aware-elements.md b/skills/modern-web-guidance/guides/user-experience/scroll-position-aware-elements.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/scroll-position-aware-elements.md
rename to skills/modern-web-guidance/guides/user-experience/scroll-position-aware-elements.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/scroll-progress-indicator.md b/skills/modern-web-guidance/guides/user-experience/scroll-progress-indicator.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/scroll-progress-indicator.md
rename to skills/modern-web-guidance/guides/user-experience/scroll-progress-indicator.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-realtime-feedback.md b/skills/modern-web-guidance/guides/user-experience/scroll-snap-realtime-feedback.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-realtime-feedback.md
rename to skills/modern-web-guidance/guides/user-experience/scroll-snap-realtime-feedback.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-state-sync.md b/skills/modern-web-guidance/guides/user-experience/scroll-snap-state-sync.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-state-sync.md
rename to skills/modern-web-guidance/guides/user-experience/scroll-snap-state-sync.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md b/skills/modern-web-guidance/guides/user-experience/scroll-target-on-load.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md
rename to skills/modern-web-guidance/guides/user-experience/scroll-target-on-load.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/scrollability-affordance-hints.md b/skills/modern-web-guidance/guides/user-experience/scrollability-affordance-hints.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/scrollability-affordance-hints.md
rename to skills/modern-web-guidance/guides/user-experience/scrollability-affordance-hints.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/scrollytelling.md b/skills/modern-web-guidance/guides/user-experience/scrollytelling.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/scrollytelling.md
rename to skills/modern-web-guidance/guides/user-experience/scrollytelling.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/search-hidden-content.md b/skills/modern-web-guidance/guides/user-experience/search-hidden-content.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/search-hidden-content.md
rename to skills/modern-web-guidance/guides/user-experience/search-hidden-content.md
diff --git a/skills/modern-web-guidance/guides/visual-design/shaped-cutouts.md b/skills/modern-web-guidance/guides/user-experience/shaped-cutouts.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/shaped-cutouts.md
rename to skills/modern-web-guidance/guides/user-experience/shaped-cutouts.md
diff --git a/skills/modern-web-guidance/guides/ui-atoms/shrinking-header-on-scroll.md b/skills/modern-web-guidance/guides/user-experience/shrinking-header-on-scroll.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-atoms/shrinking-header-on-scroll.md
rename to skills/modern-web-guidance/guides/user-experience/shrinking-header-on-scroll.md
diff --git a/skills/modern-web-guidance/guides/css/size-aware-styling.md b/skills/modern-web-guidance/guides/user-experience/size-aware-styling.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/size-aware-styling.md
rename to skills/modern-web-guidance/guides/user-experience/size-aware-styling.md
diff --git a/skills/modern-web-guidance/guides/visual-design/soft-edge-content-fade.md b/skills/modern-web-guidance/guides/user-experience/soft-edge-content-fade.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/soft-edge-content-fade.md
rename to skills/modern-web-guidance/guides/user-experience/soft-edge-content-fade.md
diff --git a/skills/modern-web-guidance/guides/js/stabilize-reactive-state.md b/skills/modern-web-guidance/guides/user-experience/stabilize-reactive-state.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/stabilize-reactive-state.md
rename to skills/modern-web-guidance/guides/user-experience/stabilize-reactive-state.md
diff --git a/skills/modern-web-guidance/guides/ui-components/stack-drill-down.md b/skills/modern-web-guidance/guides/user-experience/stack-drill-down.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-components/stack-drill-down.md
rename to skills/modern-web-guidance/guides/user-experience/stack-drill-down.md
diff --git a/skills/modern-web-guidance/guides/css/style-parent-with-has.md b/skills/modern-web-guidance/guides/user-experience/style-parent-with-has.md
similarity index 100%
rename from skills/modern-web-guidance/guides/css/style-parent-with-has.md
rename to skills/modern-web-guidance/guides/user-experience/style-parent-with-has.md
diff --git a/skills/modern-web-guidance/guides/js/support-global-calendar-systems.md b/skills/modern-web-guidance/guides/user-experience/support-global-calendar-systems.md
similarity index 100%
rename from skills/modern-web-guidance/guides/js/support-global-calendar-systems.md
rename to skills/modern-web-guidance/guides/user-experience/support-global-calendar-systems.md
diff --git a/skills/modern-web-guidance/guides/ui-behaviors/swipe-to-remove.md b/skills/modern-web-guidance/guides/user-experience/swipe-to-remove.md
similarity index 100%
rename from skills/modern-web-guidance/guides/ui-behaviors/swipe-to-remove.md
rename to skills/modern-web-guidance/guides/user-experience/swipe-to-remove.md
diff --git a/skills/modern-web-guidance/guides/visual-design/visually-stable-font-fallbacks.md b/skills/modern-web-guidance/guides/user-experience/visually-stable-font-fallbacks.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/visually-stable-font-fallbacks.md
rename to skills/modern-web-guidance/guides/user-experience/visually-stable-font-fallbacks.md
diff --git a/skills/modern-web-guidance/guides/visual-design/visually-stable-mixed-fonts.md b/skills/modern-web-guidance/guides/user-experience/visually-stable-mixed-fonts.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/visually-stable-mixed-fonts.md
rename to skills/modern-web-guidance/guides/user-experience/visually-stable-mixed-fonts.md
diff --git a/skills/modern-web-guidance/guides/visual-design/visually-texture-content.md b/skills/modern-web-guidance/guides/user-experience/visually-texture-content.md
similarity index 100%
rename from skills/modern-web-guidance/guides/visual-design/visually-texture-content.md
rename to skills/modern-web-guidance/guides/user-experience/visually-texture-content.md
diff --git a/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md b/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md
index 94e0273..bc3944e 100644
--- a/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md
+++ b/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md
@@ -11,7 +11,7 @@ WebMCP does not provide an `unregisterTool()` method. To unregister a tool, you
```javascript
const controller = new AbortController();
-await document.modelContext.registerTool({
+document.modelContext.registerTool({
name: "get_user_preferences",
description: "Retrieves the user's saved preferences.",
inputSchema: { type: "object", properties: {} },
@@ -31,7 +31,7 @@ controller.abort();
Parameters (params) are defined using the `inputSchema` property. This must be a **JSON Schema** object that describes the structured data the tool expects.
```javascript
-await document.modelContext.registerTool({
+document.modelContext.registerTool({
name: "calculate_area",
description: "Calculates the area of a rectangle.",
inputSchema: {