Baseline: before 29b0a0b2256eb5ed27df6ec5e4e4e33142a717e8; MR !16166 head fe4adb4f942385912bb3244b570afa475cadf3bd.
Scope: the 203 SVG paths in the patch, the inline SVGs in the theme, and the components that consume them.
Goal: dark mode as a first-class mode, WCAG 2.2 AA where the icons carry meaning, and no regression to light mode or forced colours.
Superseded for the current revision (2026-11-25). The implemented revision is described in revision-2026-11-25.html. It restores the autocomplete search and media edit icons, fixes dark disabled checkbox and select states, fixes status masks in forced colours, replaces the sticky-loader pseudo-element, adds tabledrag
currentColor, removes 15 unused assets and adopts 45 pixel-identical SVGO results. This plan remains as the historical backlog.
This is a work plan, not a claim of conformance. Each item names its evidence and acceptance test.
Short answer: no SVG file is missing by reference — a whole-core pass over the after tree resolved 80 SVG references with 0 missing files, and every after-side SVG has a viewBox, no XML errors and no blocked content. What is missing is narrower: CSS variables and variants that components still expect, plus a few state-specific assets.
search-muted.svg and search-muted-rtl.svg (autocomplete).pretint/edit-inverse.svg (media library dark/forced dark).The rest of this document is the implementation backlog.
| Priority | Missing item | Why it matters | Evidence | Acceptance |
|---|---|---|---|---|
| P0 | images/icons/search-muted.svg and search-muted-rtl.svg (or equivalent pretints) |
Autocomplete inputs lose the magnifier entirely. The CSS references undefined variables. | autocomplete-loading.module.pcss.css:51,57; compiled .css:58,64; old assets were 868686/magnifier.svg and magnifier-rtl.svg |
Align the input again in LTR/RTL; icon visible at 16px in light, dark and forced colours |
| P0 | images/icons/pretint/edit-inverse.svg (white/light pencil) |
Media library edit button has no glyph in dark mode and forced-colours dark. Remove already has remove-inverse; edit has no counterpart. |
media-library-item.pcss.css:289,338; compiled .css:296,345; --admin-icon-edit-inverse is undefined |
Edit button visible in dark and forced dark; forced-light unchanged |
| P1 | images/icons/pretint/chevron-down-disabled-inverse.svg (or reordered selector) |
In dark mode .dark-mode & overrides the disabled select glyph with the enabled white chevron, so the disabled arrow looks active. |
form--select.pcss.css:15-27; both selectors have equal specificity and the dark override comes later |
Disabled select has a muted chevron distinct from enabled in dark mode; checked by computed style and screenshot |
| P1 | A documented dark/forced variant or explicit decision for each remaining pretint | Pretints are frozen colour snapshots. Their usability across modes cannot be inferred from the master. | pretint/ contains check-inverse, check-disabled, chevron-down-default/inverse/disabled, remove-default/inverse |
Every pretint has a state/mode table and a tested consumer; unused pretints removed |
| File | Suggested content | Wiring and test |
|---|---|---|
images/icons/search-muted.svg and search-muted-rtl.svg |
Reuse the old before/.../images/icons/868686/magnifier.svg / magnifier-rtl.svg artwork as pretints, or add a mask-based wrapper. For dark mode, use a lighter token snapshot (for example #adaeb3) rather than reusing #868686. |
Define --admin-icon-search-muted / -rtl; add a .dark-mode override; test the autocomplete input in LTR and RTL |
images/icons/pretint/edit-inverse.svg |
Copy images/icons/pencil.svg and replace currentColor with #ffffff. |
Register --admin-icon-edit-inverse; use it in the existing dark/forced-dark media library rule; test edit and remove buttons |
images/icons/pretint/chevron-down-disabled-inverse.svg |
Copy chevron-down.svg and replace currentColor with a muted dark-surface token (for example #adaeb3). |
Define the token; add a dark-mode [disabled] selector; test enabled vs disabled in dark mode |
images/icons/pretint/check-disabled-inverse.svg |
Already proposed; #adaeb3. |
--admin-icon-checked-disabled-inverse; tested in the live permission page |
Do not bulk-generate these from every colour variant. Add only the mode/state variants that have a real consumer and a regression test.
000f33/sort--inactive.svg, 003ecc/sort--asc.svg, 868686/magnifier.svg, 82828c/checkmark.svg, media-edit.svg.checkmark, ex, questionmark, circle, trash, cog, plus, show, hide, key). Restoring them would recreate the duplication the MR correctly removes.| Family | Correct outcome |
|---|---|
| checkmark / checked | One currentColor master + light/dark/disabled pretints where native controls need them; do not restore colour variants |
| ex / remove / close | Canonical close/remove master; inverse pretint for dark; verify background-image uses |
| questionmark | Canonical help master or documented replacement; no colour variants |
| circle | Radio ring/dot is now CSS; no circle asset needed unless a non-radio consumer exists |
| sort indicators | New sort.svg, sort-asc.svg, sort-desc.svg; update the reconciliation mapping (names changed from sort--asc) |
| breadcrumb arrows | Separator is now / CSS text and the first link uses back-to-site; no arrow-breadcrumb asset needed |
| spinners | CSS border spinner and loader; do not restore the old blocked spinner SVGs merely because the lab blocked previews |
| tabledrag | drag, drag-y and inline indentation SVG; tabledrag-handle is the forced-colours mask |
| media edit/remove | pencil/close masters + edit-inverse (missing) and remove-inverse |
| module/navigation integrations | Several old toolbar/module icons are unused in core; removal is justified, not a missing icon |
Removed in the proposed tree (14 assets / 11,068 bytes): appearance, blocks, bookmarks, content, files, media, nav-toggle-left, nav-toggle-top, people, reports, structure, user, pretint/chevron-down-default, pretint/remove-default. Variable definitions and comment rows removed too.
Kept pending (2):
search.svg — needed for the missing search-muted fix.chevron-left.svg — pending the RTL/breadcrumb decision.menu.svg is used inline in menu-local-task.html.twig and is not unused.
search.svg is unused because the muted search variants are missing; keep the master only once it has a consumer.chevron-left.svg is unused; use it for a real RTL/breadcrumb need or remove it.templates/navigation/menu-local-task.html.twig:30 includes images/icons/menu.svg inline inside a labelled button. Add aria-hidden="true" / focusable="false" to the SVG so the button's aria-label is the only announced name.templates/admin/indentation.html.twig:13-35 contains an inline tabledrag tree SVG with hard-coded stroke="#888". Use currentColor (or a documented token) and aria-hidden="true" / focusable="false"; verify light, dark and forced colours.currentColor unless the artwork is intentionally multicolour (file-type/brand marks).background-color/currentColor determines the visible colour. Use background-image only where the component cannot host a mask (native <select>, <input>, <input type=submit>), and then use pretints.currentColor master as a background image without a documented reason and a dark-mode override. currentColor in an external SVG resolves to black; the theme's own pretint comment already states this.CanvasText, LinkText, ButtonText, Highlight, etc.; do not use a global forced-color-adjust: none.currentColor/tokens; document exceptions (file-type artwork).| Priority | Finding | Where | Action |
|---|---|---|---|
| P0 | --admin-icon-edit-inverse undefined |
media-library-item.pcss.css:289,338 |
Add pretint; test dark/forced dark |
| P0 | --admin-icon-search-muted / -rtl undefined |
autocomplete-loading.module.pcss.css:51,57 |
Add muted LTR/RTL assets or a mask-based wrapper |
| P1 | --admin-icon-loader used as background image while master is currentColor |
more-actions.pcss.css:66 |
Measure on the sticky button background in dark mode; use a system/token colour or a pretint |
| P1 | --admin-icon-edit used as background image in light mode |
media-library-item.pcss.css:105,282 |
Verify black-on-light; pair with the new edit-inverse |
| P1 | Status-report icons disappear in forced colours | system-status-report-general-info.pcss.css:58-68 |
Proposed patch: background-color: CanvasText under forced colours; verified on /admin/reports/status |
| P1 | Intrinsic file-type icons have no dark adaptation | file.pcss.css:30-69; 14 file-types/*.svg |
Test the file widget, media library and attachment lists on dark surfaces; add dark artwork only if the light artwork fails |
| P2 | Disabled select glyph uses the enabled white inverse in dark mode | form--select.pcss.css:15-27; computed dark disabled select uses the %23ffffff chevron with opacity: .7 and a disabled border |
Add a muted dark disabled variant or reorder the rules; the state currently relies on opacity/border, not the glyph |
| P2 | Checked+disabled checkbox in dark mode | form--checkbox-radio.pcss.css:225 |
Proposed patch: check-disabled-inverse (#adaeb3), measured 2.85:1 → 5.85:1 |
| P2 | Tabledrag inline tree uses hard-coded #888 |
indentation.html.twig:13-35 |
stroke="currentColor"; verify dark/forced |
background-image with a currentColor master is unaccounted for.| Priority | Task | Acceptance |
|---|---|---|
| P0 | Status-report icon masks: system-colour background (patch ready) | All five status icons visible in Chromium forced light and forced dark; actual /admin/reports/status screenshot |
| P0 | Media library edit icon: add edit-inverse and verify the forced-dark rule |
Edit and remove both visible in forced light/dark |
| P0 | Autocomplete search: restore muted search glyph; test forced colours | Magnifier visible, or intentionally native/hidden |
| P1 | Audit every mask-image + background-color pair for an author colour that forced colours will replace with Canvas |
No icon disappears against Canvas/CanvasText; documented system colour per case |
| P1 | Keep forced-color-adjust: none scoped to individual masks only, never globally |
Grep check: no global opt-out |
| P1 | Verify tabledrag LinkText fallback (visible in current Chromium tests) and select appearance: revert |
No regression across forced light/dark |
| P2 | Native Windows High Contrast verification | Required before claiming forced-colours readiness; Chromium emulation is not enough |
Do not treat a forced-colours simulation as native Windows evidence. Record which combinations are emulated and which are untested.
foreignObject, external href or external url().viewBox; no negative dimensions.currentColor for monochrome artwork; no accidental hard-coded hex unless a pretint or multicolour artwork.| Asset / group | Finding | Action |
|---|---|---|
| Masters (33 mask-only assets) | Render through mask-image; colour comes from the component |
Keep currentColor; test each consuming component in light/dark/forced |
| Background-only assets (20) | Intrinsic colours; currentColor renders black |
Review the 20; convert to mask where a wrapper exists; otherwise add pretints/state variants |
Mixed assets (4: check, chevron-down, close, pencil) |
Used both as mask and background image | Document both consumers; do not judge them from one preview mode; test both code paths |
| File-type icons (14) | Intentionally multicolour; aria-hidden/focusable present |
Test on dark surfaces; keep multicolour; do not mask |
| Pretints (7) | Frozen colours; several state combinations untested | Build the pretint state matrix; add edit-inverse; remove unused chevron-down-default and remove-default |
| Status icons (5) | Mask over author background disappears in forced colours | System-colour patch |
| Inline menu SVG | Included in a labelled button without aria-hidden |
Add aria-hidden="true" and focusable="false" |
| Inline indentation SVG | Hard-coded #888; no ARIA hiding |
Use currentColor; aria-hidden="true"; dark/forced test |
| Unused additions | 14 removed; 2 pending | search needs the muted-search fix; chevron-left awaits the RTL decision |
The after inventory has 0 structural errors and no missing viewBoxes; the 21 paint-value warnings are the 14 multicolour file-type icons and 7 pretints, which are expected but require the dark/forced review above.
The usage counts follow custom-property aliases (for example --messages-icon: var(--admin-icon-info)) and inline template includes. A first-pass scanner that ignored aliases reported info.svg as unused; it is actually a mask in the messages component. menu.svg is used inline in menu-local-task.html.twig, not in CSS, and is counted as image-only.
The first family beyond required/status was selected by repeated UI use: hamburger/menu, chevrons, pager arrows, checks, close/plus, sort, loader and tabledrag. The supplied hamburger/logo files were validated, their lost viewBox/ARIA restored, and 4-decimal conversion applied only after pixel checks. 21 files saved 562 SVG bytes; compiled icons.css dropped from 28,725 to 27,233 bytes for that pass. The menu is pixel-identical at 16–512px; logos are exact at UI sizes with edge-pixel differences recorded at 192px+.
Report: high-use-optimization.md; patch: proposed/interdiff-svg-high-use-optimization.patch; tests: compiled_icons_test.py and svg_optimization_status_family.py.
currentColor in dark modecurrentColor only works when the SVG inherits a CSS colour. It does not work through an SVG used as a CSS background-image: the image is rasterised on its own and currentColor becomes black. This is why several after-side assets look black on a dark preview even when the asset itself is not used.
Rules:
<img> thumbnail as a component failure.The unused after assets are recommended for removal; the proposed working tree removes them. This is optional cleanup, not an MR deletion. menu.svg is inline and inherits correctly. loader.svg was used as a background-image in the sticky form actions; the proposed fix draws it through a pseudo-element with background-color: currentColor and a mask, with a reduced-motion fallback. See proposed/reports/dark-mode-currentcolor.md, proposed/interdiff-loader-currentcolor.patch and proposed/tests/loader_dark_test.py.
Optimisation is a separate, later phase. Do not mix path rewriting with correctness fixes.
Baseline: 74 files / 41,981 bytes. The measured opportunity is:
| Item | Bytes | Share | Risk |
|---|---|---|---|
| 14 unused after-side assets (recommended removal) | 11,068 | 26.4% | Optional cleanup; 2 remaining pending decisions |
| Two identical file-type pairs | 1,546 redundant | 3.7% | Deferred: compiled CSS inlines both data URIs; source deletion alone does not reduce served CSS |
| Whitespace/comments between tags | 1,411 | 3.4% | Deferred: low value and high review noise |
| SVGO 4-decimal path conversion, all 74 | 9,214 | 21.9% | Family pilot only: required + five status icons applied |
| SVGO 3-decimal path conversion | ~10,700 | ~25% | Reject: visible pixel differences at 24–192px in the pilot |
Applied pilot: icons/required.svg, SVGO 3.3.5 with viewBox, IDs, titles/descriptions, metadata, comments and currentColor preserved; no path merging/shape conversion; 4-decimal path data. Result: 1,130 → 920 bytes (18.6%), 0 differing pixels at 16/24/32/42/64/192px. A 3-decimal version produced differences; it was rejected. logos/drupal.svg also produced a pixel-identical 4-decimal variant (1,610 → 1,222 bytes) but is not applied.
Rules:
viewBox, currentColor, IDs, titles/descriptions, licence/provenance and state variants.viewBox, or strip metadata.Result so far: after-side 74 files / 41,981 bytes → proposed 61 files / 28,661 bytes, a 31.7% reduction; compiled icons.css 40,615 → 25,587 bytes, including the 14-file cleanup, the required/status pilots, and the new check-disabled-inverse.svg.
Reports: proposed/reports/svg-optimization-pilot.md.
Patches: proposed/interdiff-svg-cleanup.patch, proposed/interdiff-svg-optimization-required.patch, proposed/interdiff-svg-optimization-status-family.patch.
Tests: proposed/tests/svg_cleanup_test.py, svg_optimization_pilot.py, svg_optimization_status_family.py.
The property matrix (proposed/reports/svg-properties.html) audits all 74 after-side SVGs for viewBox, intrinsic dimensions, currentColor/hardcoded paint, stroke class, caps/joins, fill opacity, path/shape/group counts, IDs, aria/title metadata, external references, path precision and rendered padding/ink/centre metrics.
Applied metadata normalisation:
aria-hidden="true" and focusable="false";tabledrag-handle.svg corrected from 17×17 to 16×16 to match its viewBox;The standard (proposed/reports/svg-property-standard.md) keeps families separate: 24-grid UI masters, 16-grid UI, pretints, file types and logos. It does not force file types or logos into the 24 grid, and it does not flatten deliberate stroke-weight classes. Optical padding, fill accents, stroke exceptions and path precision remain family-by-family visual decisions.
Patch: proposed/interdiff-svg-metadata-normalization.patch. Test: proposed/tests/svg_properties_test.py.
These are the checks to run per affected component. They do not replace manual testing or testing with disabled people.
| Criterion | What to verify for icons | Evidence to record |
|---|---|---|
| 1.1.1 Non-text content | Decorative background/mask icons are not announced; meaningful icon-only controls have a text alternative | aria-hidden/focusable on inline SVG; accessible name on buttons/links |
| 1.4.1 Use of colour | Checked, selected, disabled, sort direction and error states are not conveyed by colour alone | Shape/position/state test, screenshots |
| 1.4.3 Contrast (minimum) | Text labels and icon+text controls meet 4.5:1; large text 3:1 | Computed colours and contrast |
| 1.4.11 Non-text contrast | Meaningful icon graphics, state indicators and focus indicators meet 3:1 against adjacent colours | Pixel measurement at component size |
| 1.4.10 Reflow | Icons remain usable at 320px and at 200%/400% zoom | Browser reflow test |
| 2.4.7 Focus visible | Icon-only controls and handles have a visible focus indicator in light, dark and forced colours | Keyboard screenshots/computed outline |
| 2.4.11 Focus not obscured | Sticky headers/toolbars do not hide focus on icon controls | Scrolling/focus test |
| 2.5.8 Target size (minimum) | Icon-only controls are at least 24×24 CSS px or have sufficient spacing | Measured target boxes |
| 3.2.3/3.2.4 Consistency | The same icon/action looks and behaves consistently across admin pages | Component inventory |
| 4.1.2 Name, role, value | Icon-only buttons expose their name and state | Accessibility tree |
| 2.2.2/2.3.1 Animation | Spinners/throbbers respect reduced motion where required; no distracting uncontrolled motion | Reduced-motion emulation |
| 1.3.4/1.4.10 RTL | Directional icons and search/magnifier variants are correct in RTL | RTL screenshots; no missing -rtl assets |
Do not claim WCAG conformance from SVG inspection or axe alone. Record manual and assistive-technology gaps separately. Disabled controls are exempt from 1.4.11, but that exemption must not be used to ignore a state-visibility regression.
| Component | Light | Dark | Forced light | Forced dark | Sizes | RTL | Reduced motion | Status |
|---|---|---|---|---|---|---|---|---|
| Checkbox checked / disabled / error | ✅ | ✅ | ✅ | ✅ | 21px actual; 12/16/24 preview | n/a | n/a | Check fix proposed; dark disabled 5.85:1 |
| Select chevron | ✅ | ✅ | ✅ native | ✅ native | actual | ✅ | n/a | Disabled-dark state still to verify |
| Autocomplete search | ❌ | ❌ | ❌ | ❌ | 16px | ❌ | n/a | Missing asset |
| Media library edit/remove | ✅ | ❌ edit | ✅ | ❌ edit | 24px | ✅ | n/a | Missing edit-inverse |
| Status-report icons | ✅ | ✅ | ❌ before / ✅ proposed | ❌ before / ✅ proposed | 42px | n/a | n/a | Forced-colours patch ready |
| Tabledrag handle | ✅ | ✅ | ✅ LinkText |
✅ LinkText |
16px | ✅ transform | n/a | Chromium verified |
| File-type icons | ✅ | ⚠️ open | ⚠️ open | ⚠️ open | 16px | n/a | n/a | Actual widget test needed |
| Action-link icons | ✅ | ✅ | ✅ | ✅ | 1em | n/a | n/a | Mask-rendered |
| Toggle checkbox | ✅ | ✅ | ✅ | ✅ | actual | ✅ transform | ✅ transition | Check states in dark/forced |
| Inline menu / indentation | ✅ | ⚠️ | ⚠️ | ⚠️ | actual | ✅ | n/a | Fix ARIA + currentColor |
Legend: ✅ tested, ❌ missing/broken, ⚠️ needs verification.
search-muted.svg / search-muted-rtl.svg (or a mask wrapper), register them, and test autocomplete in LTR/RTL.pretint/edit-inverse.svg, register it, and test media library edit in dark and forced dark.var(--admin-icon-*) reference without a definition.background-image pointing at a currentColor master unless allowlisted with a test.forced-color-adjust; no global opt-out.search and chevron-left remain pending.aria-hidden/focusable to inline decorative SVGs.reconciliation.json; do not restore colour variants.mask/background/mixed/unused badges and a forced-colours window.search and chevron-left pending.proposed/tests/checkmark_regression.py — 6 testsproposed/tests/forced_colors_status_icons.py — 3 testsproposed/interdiff-checkmark.patch — checkmark dark disabled fixproposed/interdiff-forced-colors-status-icons.patch — status icon fixproposed/reports/screens/ — live Drupal and component screenshotsNot pushed. Not posted. Next step: Phase A, one small commit per missing variant, tested against the live lab.