Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/scripts/rtl-audit-coverage.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1488,3 +1488,29 @@ describe('curated target order (targets.json)', () => {
).toBeNull();
});
});

describe('verified N/A registry (verified-not-applicable.json)', () => {
it('declares each component once', () => {
const registry = JSON.parse(
fs.readFileSync(
new URL(
'../../apps/storybook/rtl-audit/verified-not-applicable.json',
import.meta.url,
),
'utf8',
),
);
// The coverage rollup keys declarations by component name, so a second
// entry for one component silently replaces the first.
const seen = new Set();
const duplicates = [];
for (const {component} of registry) {
const key = component.toLowerCase();
if (seen.has(key)) {
duplicates.push(component);
}
seen.add(key);
}
expect(duplicates).toEqual([]);
});
});
9 changes: 9 additions & 0 deletions apps/storybook/rtl-audit/verified-not-applicable.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,14 @@
{
"component": "core/LayerProvider",
"reason": "LayerProvider renders no box of its own: it provides layer context and mounts the root ToastViewport. Its toast `position` (`topStart` to `bottomEnd`) and its `inset` (`inlineStart`, `inlineEnd` and the block edges) are logical values it passes through unchanged; the layer runtime and ToastViewport resolve them against the document direction and own that evidence (spec:AST-059 FR6). It owns no glyph, inline spacing, physical position, order, scroll, drag, overlay or keyboard behavior."
},
{
"component": "core/VisuallyHidden",
Comment thread
astracat-bot[bot] marked this conversation as resolved.
Resolved
"reason": "VisuallyHidden renders one element clipped to a 1px box (`clip: rect(0, 0, 0, 0)`, `overflow: hidden`, `position: absolute`) and pinned with the logical `insetBlockStart` and `insetInlineStart`, so it paints nothing and its anchor follows the region's direction. It draws no glyph or decoration, takes no pointer input or text selection, and owns no order, scroll, drag, overlay or keyboard behavior; assistive technology reads its content in the document's direction. Its three stories render the hidden node beside visible caller content, which the caller lays out.",
"evidence": {
"apps/storybook/stories/VisuallyHidden.stories.tsx": "sha256:c163e87a911bc4d9413c86b24f9a6dc878a71fdab648bc4475a14b7305a9721e",
"packages/core/src/VisuallyHidden/VisuallyHidden.tsx": "sha256:28385fc054e66d4b10ef30cef41954342dce9363d97a283b94ebcd765ef7b992",
"packages/core/src/VisuallyHidden/index.ts": "sha256:e33d2b0f24e30a768df6b4347eddb0261157a57bb98018048ba60112f4134905"
}
}
]
Loading