|
1 | | -// Audit fixture — peer-plugin parity for `ember/template-no-invalid-interactive`. |
| 1 | +// Audit fixture — translates peer-plugin test cases into assertions against |
| 2 | +// our rule. Runs as part of the default Vitest suite (via the `tests/**/*.js` |
| 3 | +// include glob) and serves double-duty: (1) auditable record of peer-parity |
| 4 | +// divergences, (2) regression coverage pinning CURRENT behavior. Each case |
| 5 | +// encodes what OUR rule does today; divergences from upstream plugins are |
| 6 | +// annotated as `DIVERGENCE —`. Peer-only constructs that can't be translated |
| 7 | +// to Ember templates (JSX spread props, Vue v-bind, Angular `$event`, |
| 8 | +// undefined-handler expression analysis) are marked `AUDIT-SKIP`. |
2 | 9 | // |
3 | | -// Our rule covers the combined concerns of TWO jsx-a11y rules: |
| 10 | +// Our rule (`ember/template-no-invalid-interactive`) covers the combined |
| 11 | +// concerns of TWO jsx-a11y rules: |
4 | 12 | // - `no-static-element-interactions` (div/span/etc. + onClick, no role) |
5 | 13 | // - `no-noninteractive-element-interactions` (article/p/main/etc. + onClick) |
6 | 14 | // plus the single vue rule `no-static-element-interactions`. |
7 | 15 | // |
8 | | -// This file does NOT run in CI; it encodes CURRENT behavior of our rule so |
9 | | -// that executing it reports pass. Each case is annotated with the peer rule |
10 | | -// it was translated from and any divergence. |
11 | | -// |
12 | 16 | // Source files (context/ checkouts): |
13 | 17 | // - eslint-plugin-jsx-a11y-main/__tests__/src/rules/no-static-element-interactions-test.js |
14 | 18 | // - eslint-plugin-jsx-a11y-main/__tests__/src/rules/no-noninteractive-element-interactions-test.js |
@@ -117,9 +121,10 @@ ruleTester.run('audit:no-invalid-interactive (gts)', rule, { |
117 | 121 | '<template><img onerror={{this.h}} alt="x" /></template>', |
118 | 122 |
|
119 | 123 | // <form onSubmit> — parity as above. |
120 | | - // <iframe onLoad> — jsx-a11y no-noninteractive: alwaysValid. |
121 | | - // DIVERGENCE (noted in invalid section): our rule does NOT allow onload on iframe; |
122 | | - // ELEMENT_ALLOWED_EVENTS only covers form + img. See invalid-section cross-ref. |
| 124 | + // <iframe onLoad> — jsx-a11y no-noninteractive: alwaysValid. PARITY. |
| 125 | + // Ours: `iframe` is in NATIVE_INTERACTIVE_ELEMENTS, so isInteractive() |
| 126 | + // returns true and the rule early-returns. See invalid-section cross-ref |
| 127 | + // at line 517 for the full parity assertion. |
123 | 128 |
|
124 | 129 | // ========================================================================= |
125 | 130 | // Bucket C — vue/no-static-element-interactions (valid) |
|
0 commit comments