FAILURE MAP
← Case archive

FA-8356 / Keyboard accessibility / Open access

Grid-cell keyboard movement: Left arrows wrap into the previous grid edge · case 01

Left arrows wrap into the previous grid edge.

Verified by executionVariant 1 · 11 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The left clamp operation uses `(column-1) % columns` where the contract requires `max(0, column-1)`.

THE FAILURE

The left clamp operation uses `(column-1) % columns` where the contract requires `max(0, column-1)`.

Unsuccessful approach: Moving by two skips adjacent cells.

Case contract

Arrow keys move one cell and clamp without wrapping; Home/End target row edges; Control additionally targets the first/last row.

Why this case matters

A deterministic model of grid-cell keyboard movement; this isolates one interface invariant without requiring a browser.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows, columns, row, column, key, ctrl):
    if key == 'Left': column = (column-1) % columns
    elif key == 'Right': column = min(columns-1, column+1)
    elif key == 'Up': row = max(0, row-1)
    elif key == 'Down': row = min(rows-1, row+1)
    elif key == 'Home': column = 0; row = 0 if ctrl else row
    elif key == 'End': column = columns-1; row = rows-1 if ctrl else row
    return (row, column)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('left boundary', solve(3, 5, 1, 0, 'Left', False), (1, 0))
check('left step', solve(3, 5, 1, 3, 'Left', False), (1, 2))
check('right boundary', solve(3, 5, 1, 4, 'Right', False), (1, 4))
check('right step', solve(3, 5, 1, 3, 'Right', False), (1, 4))
check('up', solve(3, 5, 1, 3, 'Up', False), (0, 3))
check('home', solve(3, 5, 1, 3, 'Home', False), (1, 0))
check('ctrl home', solve(3, 5, 1, 3, 'Home', True), (0, 0))
check('end', solve(3, 5, 1, 3, 'End', False), (1, 4))
check('ctrl end', solve(3, 5, 1, 3, 'End', True), (2, 4))
check('parameterized grid shape', solve(N+2,N+3,N,N,'Right',False), (N,N+1))
for repetition in range(N):
    check('repeat ctrl end', solve(3, 5, 1, 3, 'End', True), (2, 4))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
left boundary[1, 4][1, 0]Failed
left step[1, 2][1, 2]Passed
right boundary[1, 4][1, 4]Passed
right step[1, 4][1, 4]Passed
up[0, 3][0, 3]Passed
home[1, 0][1, 0]Passed
ctrl home[0, 0][0, 0]Passed
end[1, 4][1, 4]Passed
ctrl end[2, 4][2, 4]Passed
parameterized grid shape[1, 2][1, 2]Passed
repeat ctrl end[2, 4][2, 4]Passed

SHA-256 / 1f9b733c97899060567c33b508d99474acb94234d48d8f50fb11e4f55dab6bdd

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows, columns, row, column, key, ctrl):
    if key == 'Left': column = max(0, column-2)
    elif key == 'Right': column = min(columns-1, column+1)
    elif key == 'Up': row = max(0, row-1)
    elif key == 'Down': row = min(rows-1, row+1)
    elif key == 'Home': column = 0; row = 0 if ctrl else row
    elif key == 'End': column = columns-1; row = rows-1 if ctrl else row
    return (row, column)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('left boundary', solve(3, 5, 1, 0, 'Left', False), (1, 0))
check('left step', solve(3, 5, 1, 3, 'Left', False), (1, 2))
check('right boundary', solve(3, 5, 1, 4, 'Right', False), (1, 4))
check('right step', solve(3, 5, 1, 3, 'Right', False), (1, 4))
check('up', solve(3, 5, 1, 3, 'Up', False), (0, 3))
check('home', solve(3, 5, 1, 3, 'Home', False), (1, 0))
check('ctrl home', solve(3, 5, 1, 3, 'Home', True), (0, 0))
check('end', solve(3, 5, 1, 3, 'End', False), (1, 4))
check('ctrl end', solve(3, 5, 1, 3, 'End', True), (2, 4))
check('parameterized grid shape', solve(N+2,N+3,N,N,'Right',False), (N,N+1))
for repetition in range(N):
    check('repeat ctrl end', solve(3, 5, 1, 3, 'End', True), (2, 4))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
left boundary[1, 0][1, 0]Passed
left step[1, 1][1, 2]Failed
right boundary[1, 4][1, 4]Passed
right step[1, 4][1, 4]Passed
up[0, 3][0, 3]Passed
home[1, 0][1, 0]Passed
ctrl home[0, 0][0, 0]Passed
end[1, 4][1, 4]Passed
ctrl end[2, 4][2, 4]Passed
parameterized grid shape[1, 2][1, 2]Passed
repeat ctrl end[2, 4][2, 4]Passed

SHA-256 / 1194df07e482378eee612081188d4e0f894572e5886859aad09c93a7c38acf12

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 11 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:20.783411+00:00.

Case digest / af046650a4e6f5f7494c143ba8aa5b53219df726840ebc89af159623f4d75e42