/modern-html:modern-html-native-html-primitivesfrom modern-html
Native dialog/popover/tooltip/accordion/disclosure/search/lazy-img/command-buttons — dialog (showModal, ::backdrop, requestClose), Popover API (popover, popovertarget, auto/manual/hint), details/summary name attr exclusive accordion, inert, loading=lazy, command/commandfor. Use when: dialog/modal, tooltip/dropdown, FAQ/accordion, search landmark, defer offscreen images. Skip: CSS-only, non-HTML.
Ships in modern-html. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
<dialog> (甲)<button command="show-modal" commandfor="confirm-dlg">Delete</button>
<dialog id="confirm-dlg" aria-labelledby="dlg-title">
<h2 id="dlg-title">Delete this item?</h2>
<form method="dialog">
<button value="cancel">Cancel</button>
<button value="confirm" autofocus>Delete</button>
</form>
</dialog>
要點:
showModal() 自 trap focus、inert 餘頁。show() 非模。dialog::backdrop 樣 scrim。aria-labelledby 必。勿 加 role="dialog"。requestClose() 觸 cancel event (乙, 2025)。command="show-modal" commandfor="..." 是乙 (2025-12)。甲替:JS dlg.showModal()。<button popovertarget="help">?</button>
<div id="help" popover>Help text</div>
popover 值:
auto (default) — light-dismiss + ESC + 一次一 popover/scope。manual — 手控。hint — 丙 (Interop 2026)。注:popover 不自設 aria-describedby。手加之。
iOS 早期 light-dismiss bug 已修於 Safari 18.3。
command / commandfor (乙, 2025)替 popovertarget 之更廣語義:
<button command="show-modal" commandfor="dlg">Open</button>
<button command="close" commandfor="dlg">X</button>
<button command="toggle-popover" commandfor="menu">≡</button>
值:show-modal、close、toggle-popover、show-popover、hide-popover。
<details> / <summary> (甲)獨立:
<details><summary>Q1</summary><p>A1</p></details>
<details><summary>Q2</summary><p>A2</p></details>
互斥(乙, 2025-04 Firefox 130):
<details name="faq"><summary>Q1</summary>...</details>
<details name="faq"><summary>Q2</summary>...</details>
a11y:<summary> 自報 button + disclosure role。勿覆 ARIA。
<search> (甲, 2026-04)<search>
<form>...</form>
</search>
語義 landmark。免 role="search"。
inert (甲)<main inert>...</main>
移自 a11y tree + tab order。modal <dialog> 自 inert 餘頁,故無需手 inert。手用於 SPA 路由切換、自定 modal scrim。
<img src="..." loading="lazy" decoding="async" width="800" height="600" alt="...">
<iframe src="..." loading="lazy"></iframe>
必 width/height 防 CLS。勿 lazy LCP / above-fold。
<dialog> — SR 報 "dialog" 無 context。title attribute as tooltip — touch + 多 SR 不見。role="dialog" 於 <dialog> — 重複。accordion 加於 <details> — 已具語義,覆則破。<details> — 非語義 tabs;須 ARIA tablist。popover 與 <dialog> 混用無協調 — 二者皆 top-layer,疊序須慎。display:none 缺三件 — 必 @starting-style + transition-behavior: allow-discrete + display/overlay in transition list。examples/dialog.htmlexamples/popover-anchor.htmlexamples/details-accordion.htmlexamples/invokers.htmlreferences/a11y-notes.mdmodern-html:baseline-decision-protocol — 前置 Tier A/B/C 閘;先判可用層,再取此技各特性。What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub standardbeagle/standardbeagle-tools --plugin modern-html10 skills in this plugin
/modern-html-accessibility-primitivesNative a11y primitives — focus-visible, focus-within, inert, prefers-reduced-motion, prefers-color-scheme, prefers-contrast, forced-colors, accessibility-tree for dialog/popover/anchor-positioning, ARIA labeling. Use when: focus styles, keyboard nav, animating UI, picking colors, modal/popover content, auditing component a11y. Skip: backend code, non-rendered content./modern-html-baseline-decision-protocolBaseline-tier decision tree for HTML/CSS/DOM Tier A Widely-9mo auto-adopt, Tier B Newly prompt, Tier C Limited avoid sans fallback. Use when: writing CSS/HTML, picking UI pattern, replacing JS lib, choosing layout/animation primitive, before popover/dialog/container-queries/anchor-positioning/view-transitions/scroll-driven-animations/color-mix/oklch/:has(). Skip: non-UI code./modern-html-css-architecture