From 629e70cdbc07b739e2529174bcf4c8bc62722686 Mon Sep 17 00:00:00 2001 From: 0libote <79215282+0libote@users.noreply.github.com> Date: Mon, 23 Nov 2026 20:42:43 +0000 Subject: [PATCH] sync(modern-web-guidance): modern-web-guidance from GoogleChrome/modern-web-guidance@2b4aa13 --- .../modern-web-guidance/modern-web-guidance | 2 +- skills/modern-web-guidance/SKILL.md | 4 +- .../guides/css/css-layout.md | 2 +- .../guides/forms/brand-consistent-forms.md | 2 +- .../conditional-async-dependencies.md | 2 +- .../guides/security/passkey-authentication.md | 7 +- .../guides/security/security.md | 49 +++- .../ui-atoms/position-aware-tooltips.md | 10 + .../ui-atoms/viewport-aware-dropdowns.md | 10 + .../anchor-positioning-tab-underline.md | 39 ++- .../ui-behaviors/animate-to-from-top-layer.md | 10 + .../ui-behaviors/custom-button-actions.md | 7 +- .../declarative-dialog-popover-control.md | 10 + .../interest-triggered-action-previews.md | 2 + .../interest-triggered-tooltips.md | 10 + .../platform-controls-dismiss-dialog.md | 14 +- .../scroll-snap-realtime-feedback.md | 2 +- .../guides/ui-behaviors/sortable-table.md | 27 +- .../guides/ui-components/app-menus.md | 36 ++- .../guides/ui-components/context-menu.md | 274 ++++++++++++++++++ .../guides/ui-components/copy-button.md | 21 +- .../guides/ui-components/dialog.md | 14 +- .../guides/ui-components/hovercard.md | 12 +- .../guides/ui-components/menu.md | 49 ++-- .../guides/ui-components/navbar.md | 15 +- .../ui-components/persistent-app-tours.md | 10 + .../persistent-toast-notifications.md | 10 + .../guides/ui-components/progress-ring.md | 13 +- .../guides/ui-components/toolbar.md | 15 +- .../content-first-noise-reduction.md | 10 + .../user-experience/natural-interactions.md | 10 + .../visual-design/soft-edge-content-fade.md | 64 ---- .../guides/visual-design/teaser.md | 109 +++++++ .../guides/visual-design/visual-effects.md | 21 +- .../guides/webmcp/agentic-javascript-tools.md | 72 +++++ 35 files changed, 819 insertions(+), 145 deletions(-) create mode 100644 skills/modern-web-guidance/guides/ui-components/context-menu.md delete mode 100644 skills/modern-web-guidance/guides/visual-design/soft-edge-content-fade.md create mode 100644 skills/modern-web-guidance/guides/visual-design/teaser.md diff --git a/.github/upstream-state/modern-web-guidance/modern-web-guidance b/.github/upstream-state/modern-web-guidance/modern-web-guidance index 6cd70d9..10e2182 100644 --- a/.github/upstream-state/modern-web-guidance/modern-web-guidance +++ b/.github/upstream-state/modern-web-guidance/modern-web-guidance @@ -1 +1 @@ -64a6d708f5a43f2cd3fde5d4d7db3905ba1bdf65 +2b4aa13a72dd47cd135b06ce5abfccd92e19b24f diff --git a/skills/modern-web-guidance/SKILL.md b/skills/modern-web-guidance/SKILL.md index 7483c78..f4e966d 100644 --- a/skills/modern-web-guidance/SKILL.md +++ b/skills/modern-web-guidance/SKILL.md @@ -20,7 +20,7 @@ Run `modern-web-guidance` directly with `npx` using a **2–5 word action-orient - **Example**: Search `"light dismiss dialog"` or `"responsive data table"`, **not** `"dialog"` (too terse), `"responsive table dark mode"` (compound — split into two searches), or `"close React settings modal on outside click"` (framework/app noise). ```sh -npx -y modern-web-guidance@latest search "" --skill-version 2026_11_10-47b4c80e +npx -y modern-web-guidance@latest search "" --skill-version 2026_11_16-268fb9ea ``` > **Note**: Returns `[{ "id", "description" }, ...]`. Judge results by their `description` fields: @@ -30,7 +30,7 @@ npx -y modern-web-guidance@latest search "" --skill-version 2026_11_10-47 ### Step 2. Retrieve Best Practices -Once you have relevant `id`(s) from the search results, call `retrieve` to get the full guide(s)—including both specific use-case guides that match your task and any broader discipline guide (e.g., `html`, `css`, `forms`, `accessibility`, `color`, `performance`, `security`) that applies. You can pass multiple IDs separated by commas. +Once you have relevant `id`(s) from the search results, call `retrieve` to get the full guide(s)—including both specific use-case guides that match your task and any broader discipline guide (e.g., `html`, `css`, `js`, `forms`, `accessibility`, `color`, `performance`, `security`) that applies. You can pass multiple IDs separated by commas. ```sh npx -y modern-web-guidance@latest retrieve "" diff --git a/skills/modern-web-guidance/guides/css/css-layout.md b/skills/modern-web-guidance/guides/css/css-layout.md index 086f7b7..b85ad03 100644 --- a/skills/modern-web-guidance/guides/css/css-layout.md +++ b/skills/modern-web-guidance/guides/css/css-layout.md @@ -289,7 +289,7 @@ Supported by: Chrome 108 (Nov 2022), Edge 108 (Dec 2022), Firefox 101 (May 2022) ## 8 Grid lanes (aka masonry) Browser support for Grid lanes: Limited availability. -Supported by: Safari 27.2. +Supported by: Safari 27.2 (Oct 2026). Unsupported in: Chrome, Edge, and Firefox. The specification is in development under the name "grid lanes" (e.g., `display: grid-lanes`), while earlier experimental prototypes used `grid-template-rows: masonry`. diff --git a/skills/modern-web-guidance/guides/forms/brand-consistent-forms.md b/skills/modern-web-guidance/guides/forms/brand-consistent-forms.md index 90eaf44..3c64efe 100644 --- a/skills/modern-web-guidance/guides/forms/brand-consistent-forms.md +++ b/skills/modern-web-guidance/guides/forms/brand-consistent-forms.md @@ -246,7 +246,7 @@ input[type="range"]::-webkit-slider-runnable-track { 2. **Add JavaScript**: Update the variable on the `input` event: ```javascript -if (!CSS.supports('accent-color')) { +if (!CSS.supports('accent-color', 'auto')) { const slider = document.getElementById('volume'); slider.addEventListener('input', (e) => { e.target.style.setProperty('--progress', `${e.target.value}%`); diff --git a/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md b/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md index b75a7bb..a7c5445 100644 --- a/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md +++ b/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md @@ -6,7 +6,7 @@ By utilizing top-level await, you can encapsulate the conditional loading logic ### Conditional polyfill pattern -While top-level `await` can be used to conditionally load any async dependency that's a module, a good use of the conditional depenency loading pattern is to conditionally load polyfills for browsers that don't support a specific feature. This approach encapsulates feature detection and the dynamic import inside a single dependency module. +While top-level `await` can be used to conditionally load any async dependency that's a module, a good use of the conditional dependency loading pattern is to conditionally load polyfills for browsers that don't support a specific feature. This approach encapsulates feature detection and the dynamic import inside a single dependency module. In the following case, the `popover` attribute polyfill is conditionally loaded if it isn't present on `HTMLElement.prototype`: diff --git a/skills/modern-web-guidance/guides/security/passkey-authentication.md b/skills/modern-web-guidance/guides/security/passkey-authentication.md index 8d96ba6..05d89e4 100644 --- a/skills/modern-web-guidance/guides/security/passkey-authentication.md +++ b/skills/modern-web-guidance/guides/security/passkey-authentication.md @@ -46,19 +46,24 @@ Use the `autofocus` attribute on dedicated sign-in pages and sign-in dialogs so Use the `aria-describedby` attribute on elements with `autofocus` so instructions and context are provided for screen reader users. +Give every input a visible `