Repository navigation
refactor(content): share native disclosures with code blocks - #94
Merged
Merged
Conversation
This was referenced Oct 2, 2026
hakula139
force-pushed
the
fix/native-code-disclosures
branch
from
October 2, 2026 20:40
f9492b8 to
99722f3
Compare
hakula139
added a commit
to hakula139/kiln
that referenced
this pull request
Oct 3, 2026
## Summary
- Use native HTML disclosures for code blocks so they share the callout
and TOC interaction model. Version the changed HTML contract as kiln
`0.4.0-rc.3`, which the paired theme requires.
- **Disclosure state** — render `details.code-block` with a
`summary.code-header`. Default and `{expand}` blocks start open, while
`{collapse}` omits `open`. Preserve titles, IDs, custom classes, syntax
highlighting, and line-limit attributes.
- **Copy accessibility** — give the copy button a persistent
`aria-label="Copy code"` so replacing its text with an icon retains its
accessible name.
- **Syntax reference** — update the generated HTML example and explain
native toggling and theme line limits.
### Related PRs
- Related documentation correction: #84.
- Custom-class escaping: #85.
- [IgnIt shared disclosures](hakula139/IgnIt#94)
- [Draft site
integration](hakula139/hakula.xyz-kiln#92)
## Test plan
- [x] `cargo fmt --all --check`, `cargo build --locked`, and `cargo
clippy --locked --all-targets -- -D warnings` pass in the Nix
development shell.
- [x] `cargo test --locked`: 860 tests pass, including exact disclosure
/ summary markup, accessible copy labels, line-limit overrides for
default, collapse, and expand fences, and escaped custom-class
round-tripping on native markup.
- [x] `pnpm format`, `pnpm lint`, `pnpm spellcheck`, and `git diff
--check` pass.
- [x] `cargo llvm-cov --locked --ignore-filename-regex 'main\.rs'
--summary-only`: 98.46% region coverage and 99.10% line coverage.
- [x] Reviewer subagent: no findings. The coordinated version
requirement was reviewed after the change.
- [x] Paired theme and site checks passed native toggling, copy payloads
and disclosure state, nested disclosures, reduced motion, and
closed-body focus exclusion in Chromium, Firefox, and WebKit.
- [x] Runtime compatibility: released `0.4.0-rc.2` rejects the updated
theme before writing build output, while `0.4.0-rc.3` accepts and builds
it.
hakula139
added a commit
to hakula139/hakula.xyz-kiln
that referenced
this pull request
Oct 3, 2026
## Summary - Pin merged kiln `00b3350` and IgnIt `ebe36f9`, then regenerate the committed stylesheet. Code blocks use native `<details>` / `<summary>` and share disclosure state, keyboard interaction, and motion rules with callouts and the mobile TOC. - Preserve fence collapse / expand options, syntax highlighting, titles, and line-limit scrolling. Copy clicks cancel native summary activation before feedback replaces the icon, keeping the disclosure state unchanged. The icon button retains an accessible name. The renderer includes custom-class escaping from kiln #85, and the theme requires kiln `0.4.0-rc.3` so older renderers fail the compatibility check before producing incompatible markup. ## Verification - `pnpm build`, `pnpm format`, `pnpm lint`, `pnpm spellcheck`, `nix flake check`, and `git diff --check` passed on aarch64-darwin. The compiled stylesheet is in sync. - The updated pinned kiln `0.4.0-rc.3` Nix build built and indexed all 75 pages, then minified 232 files. Integrated Chromium, Firefox, and WebKit checks passed at 390px dark and 1440px light for native Enter / Space toggling, nested disclosure independence, exact copy payloads, unchanged disclosure state when copying, closed-body focus exclusion, reduced motion, and no page overflow. Native mouse / Space toggling also passed with JavaScript disabled in all three engines. Mobile dark and desktop light screenshots were inspected. - WebKit skips a summary button in sequential Tab navigation after a mouse click, also reproduced with plain native details and no theme CSS or JavaScript. Initial Tab navigation reaches the copy button. - Native Safari and screen readers were not tested. Production deployment is checked after merge. Clipboard writes were mocked in browser checks to verify the exact copied text without accessing the system clipboard. Comments were excluded from the page checks. ## Related PRs - [kiln custom-class escaping](hakula139/kiln#85) - [kiln renderer](hakula139/kiln#82) - [IgnIt shared disclosures](hakula139/IgnIt#94)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use native code-block disclosures from kiln and share summary markers, open-state chevrons, body transitions, and reduced-motion behavior with callouts and the mobile TOC. Remove the custom JavaScript toggler, keeping clipboard behavior. Require kiln
0.4.0-rc.3so older renderers fail the existing version check before producing incompatible code-block markup. Cancel the copy click default before replacing its icon so native summary activation cannot toggle the block after the original click target is detached. Direct-child chevron selectors keep nested disclosure states independent.Verification
pnpm build,pnpm format,pnpm lint,pnpm spellcheck,nix flake check, andgit diff --checkpassed. Compiled CSS matches the source.0.4.0-rc.2rejects this theme before writing output, while the new0.4.0-rc.3binary builds it. Follow-up review found no issues with the version requirement.Related PRs