SCR27: DOM Reordering That Doesn't Break Focus Order
Patricia · AI Research Engine
Analytical lens: Risk/Legal Priority
Government compliance, Title II, case law
AI-assisted · Source-linked · Editorially reviewed · Methodology
Trust note
This article was drafted with AI assistance, reviewed against accessibility.chat editorial standards, and should be treated as research and education rather than legal advice. We prioritize primary sources and correct material errors.

For a mouse user, rearranging dashboard widgets feels intuitive: grab, drag, drop. The interface responds immediately, and the visual order matches their intent. For a keyboard user — or someone using a switch, a voice control tool, or any input device that isn't a pointer — that same drag-and-drop interface is often a dead end. No keyboard hook, no fallback, no path forward.
This is the gap WCAG Technique SCR27 (opens in new window) is designed to close.
The Technique
SCR27 describes a JavaScript-based mechanism for reordering page sections using the Document Object Model — not just visually, but structurally. When content is reordered in the DOM, that order becomes the order that assistive technologies follow. Screen readers navigate the DOM, not the visual layout. Keyboard focus follows the DOM. So reordering visually without touching the DOM leaves assistive technology users in a fundamentally different — and often broken — experience.
The technique's approach is straightforward: attach a small context menu to each reorderable component, offering options like "up" and "down" (and potentially "left" and "right" for two-dimensional layouts). These menu links use the device-independent onclick event to trigger the actual DOM swap. The result is a reordering mechanism that any input device can operate.
The official W3C example structures reorderable components as list items inside an unordered list — semantically appropriate for sets of similar items — with each component containing a nested menu list:
<ul id="swapper"> <li id="black"> <div class="module"> <div class="module_header"> <!-- menu trigger --> <a href="#" onclick="ToggleMenu(event);">menu</a> <!-- reorder options --> <ul class="menu"> <li><a href="#" onclick="OnMenuClick(event)" onkeypress="OnMenuKeypress(event);">up</a></li> <li><a href="#" onclick="OnMenuClick(event)" onkeypress="OnMenuKeypress(event);">down</a></li> </ul> </div> <div class="module_body"> Text in the black module </div> </div> </li> <!-- additional modules --></ul>The onkeypress handlers on the menu items ensure keyboard users can activate the same reordering actions. The DOM manipulation happens in script — moving the actual <li> elements, not just applying CSS transforms or changing visual positioning.
Why This Matters
The relevant success criterion is 2.4.3 Focus Order (opens in new window), which requires that when a page can be navigated sequentially, the focus order preserves meaning and operability. SCR27 is listed as a sufficient technique for meeting 2.4.3 specifically in the context of dynamic page changes.
Here's what breaks when teams skip this: a user rearranges content using a drag-and-drop widget (or any visually-only reordering mechanism), and the visual layout changes — but the DOM doesn't. The screen reader user is now navigating in the old order. The keyboard user's Tab sequence reflects the original structure. The visual and structural states of the page have diverged, and the user relying on the structure has no way to know that, or to recover from it.
This isn't a subtle edge case. Customizable dashboards, content management interfaces, form builders, and preference panels are common in enterprise applications, government portals, and educational platforms. Every one of those contexts carries Title II or Title III obligations, and every one of them can silently fail keyboard and AT users if DOM reordering isn't part of the implementation.
| WCAG Criterion | Level | SCR27 Addresses | What Breaks Without It |
|---|---|---|---|
| 2.4.3 Focus Order (opens in new window) | AA | ✓ Sufficient technique | Focus sequence diverges from visual order after reordering |
| 1.3.2 Meaningful Sequence | A | Related (not listed) | Reading order for AT users reflects pre-reorder state |
| 2.1.1 Keyboard | A | Indirectly supported | Drag-only interfaces exclude keyboard users entirely |
How It Works
The mechanism has two parts: the menu UI and the DOM swap logic. The menu provides the interaction surface — links that keyboard users can Tab to and activate. The DOM swap is where the actual accessibility work happens. When a user selects "up" or "down," the script moves the parent <li> element in the DOM, not just its visual position. After the move, focus management matters: the script should return focus to the moved component or to a logical location, so keyboard users don't lose their place.
Modern implementations would typically supplement or replace onkeypress (which has known issues with key code handling) with addEventListener('keydown', ...), and would use insertBefore() or after() for the DOM manipulation. The structural principle from the W3C document remains sound: the semantic container moves, and the DOM reflects the new order immediately.
For teams building on ARIA, the ARIA Authoring Practices Guide (opens in new window) provides patterns for listbox and grid widgets that can complement this approach, particularly where the reorderable items need richer keyboard interaction semantics.
Applying This
The practical challenge for development teams is that automated testing will not catch this failure reliably. A tool can confirm that interactive elements are keyboard-reachable in the initial state. It cannot simulate a reorder, then verify that the DOM reflects the new visual order, then confirm that focus lands somewhere logical. That sequence requires scripted testing or manual review.
As our research on testing methodology documents, automated tools catch at most 37% of real accessibility barriers — and dynamic interaction failures like post-reorder DOM divergence sit firmly in the 63% that automation misses.
Practical steps for teams:
- In code review: When any reordering feature is introduced, require evidence that DOM order changes, not just CSS. A
z-indexchange ortransformis not a DOM reorder. - In QA: After any reorder action, inspect the DOM (browser DevTools → Elements panel) and verify the structural order matches the visual order.
- In design: If drag-and-drop is specified, SCR27-style menu controls should be a required companion feature, not an afterthought. Document this in the design system.
- In acceptance criteria: "User can reorder components" should explicitly include "keyboard user can reorder components" and "DOM order reflects visual order after reordering."
For compliance officers reviewing VPATs or accessibility conformance reports, a claim of 2.4.3 conformance on any interface with dynamic reordering should trigger a specific question: how is DOM order maintained after user-initiated changes?
The compliance framework research we've published shows that organizations often treat WCAG conformance as a point-in-time audit result. Dynamic interactions like reordering expose exactly why that model fails — a page that passes at load time can fail the moment a user interacts with it.
CORS Perspective
From a risk and legal priority standpoint, SCR27 addresses a category of failure that carries compounding exposure: it affects keyboard users, switch users, and screen reader users simultaneously, it occurs in high-engagement interface areas (dashboards, preference panels), and it's invisible to automated scanning — meaning organizations can hold a passing audit report while the violation persists in production. For any government entity or federally-funded program subject to Title II (opens in new window) obligations, or any organization under a DOJ settlement agreement (opens in new window), dynamic DOM integrity should be a named requirement in technical specifications, not an assumed behavior. The cost of getting this right at the design stage is a few hours. The cost of discovering it post-deployment — or post-complaint — is considerably higher.
About the Patricia lens
A risk and legal lens. Frames findings around regulatory exposure, drawing on Title II obligations, published case law, and government compliance requirements.
Patricia is an AI analyst lens, not a human staff member. It helps frame this article through a consistent accessibility perspective.
Specialization: Government compliance, Title II, case law
View all articles using this lens →Primary source reviewed: https://www.w3.org/WAI/WCAG22/Techniques/client-side-script/SCR27 (opens in new window)
Transparency Disclosure
This article was drafted with AI assistance and reviewed against our editorial methodology. We disclose that process so readers can judge the work clearly.