Skip to content

feat(core)!: score require-datetime and doctype by their evidence - #523

Merged
oekazuma merged 1 commit into
mainfrom
feat/a11y-severity-evidence
Aug 17, 2026
Merged

oekazuma merged 1 commit into
mainfrom
feat/a11y-severity-evidence

Conversation

@oekazuma

@oekazuma oekazuma commented Aug 17, 2026 •

Copy link
Copy Markdown
Owner

The two severity questions the Phase B-4 review left open, decided on the principle that a rule without evidence gets demoted and a rule without meaning gets deleted. Neither is meaningless — both detect a real defect — so both are demoted rather than removed.

Why each

  • a11y/require-datetime has evidence, but not accessibility evidence. Its requirement is HTML conformance; there is no WCAG criterion about <time>. A screen reader reads "last Tuesday" exactly as a sighted reader does — what the element loses is its machine-readable value. warning claimed more than that.
  • a11y/doctype's accessibility premise has no source at all. Quirks mode is documented as a layout difference, and WCAG 4.1.1 Parsing, which used to justify markup-validity checks, is obsolete and removed. The layout claim is sourced, so the rule stays — at the weight that claim supports.

This is the standard #428 set for the SEO category: severity tracks the strength of the evidence.

Exit-code consequences, measured

Per rule, on a fixture isolated with --rules, before and after. Both movements loosen a gate; nothing tightens.

rule --fail-on critical (default) --fail-on warning --fail-on info
a11y/require-datetime 0 → 0 1 → 0 1 → 1
a11y/doctype 0 → 0 1 → 0 1 → 1

A project on the default gate is unaffected. A project on --fail-on warning whose only finding is one of these two goes red → green.

Score consequences, measured

  • a11y::component: 46 → 42 points of severity weight. On this repo's own example app the a11y category reads 83 → 87 with no change in findings.
  • a11y::project: 5 → 1, absorbed by the floor of 25 — but a project-scope finding is an absolute deduction, so a missing doctype now costs its category 1 point instead of 5.
  • The widest pair is unchanged at 100, so the floor's info < warning ordering invariant is untouched.

One caveat worth recording, since it caught me mid-measurement: scoring a rule in isolation with --rules also shrinks the inventory to that one rule, so the headline numbers from such a run (80 → 96, 95 → 99) are not what a real project sees. The 83 → 87 above is the full-run figure.

Also updated

Both rule pages carry the reason for the demotion in both languages, so the weight is legible rather than arbitrary; the generated rule-index pages, the explain --list snapshots, and the translation ledger follow.

pnpm build, pnpm typecheck, pnpm test, pnpm lint, translate:check all clean.

Still open

Two smaller Priority 2 items remain: accepting the literal undefined for aria-* boolean/tristate values, where the ARIA spec and Svelte's own compiler disagree, and uppercase ARIA attribute names being invisible to the collector (a false negative).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Reclassified a11y/doctype and a11y/require-datetime findings from warnings to informational notices.
    • Updated rule scoring and exit-code behavior to reflect the reduced severity.
  • Documentation

    • Updated English and Japanese accessibility rule listings and explanations.
    • Clarified that these rules relate primarily to HTML conformance and layout considerations rather than direct accessibility impact.
    • Added release notes for the upcoming minor version.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 105898c2-753f-468d-a45d-16e1a8850bc4

📥 Commits

Reviewing files that changed from the base of the PR and between adf3283 and 4a5176b.

⛔ Files ignored due to path filters (1)
  • packages/cli/test/__snapshots__/gunshi-explain-parity.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (12)
  • .changeset/olive-spies-jam.md
  • docs/blume.translations.json
  • docs/src/content/docs/ja/rules/a11y/doctype.md
  • docs/src/content/docs/ja/rules/a11y/index.mdx
  • docs/src/content/docs/ja/rules/a11y/require-datetime.md
  • docs/src/content/docs/ja/rules/index.mdx
  • docs/src/content/docs/rules/a11y/doctype.md
  • docs/src/content/docs/rules/a11y/index.mdx
  • docs/src/content/docs/rules/a11y/require-datetime.md
  • docs/src/content/docs/rules/index.mdx
  • packages/core/src/rules/a11y/doctype.ts
  • packages/core/src/rules/a11y/require-datetime.ts

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR demotes a11y/doctype and a11y/require-datetime from warning to info severity. It updates rule implementations, English and Japanese documentation, translation revisions, and release metadata.

Changes

Accessibility severity updates

Layer / File(s) Summary
Rule severity implementation
packages/core/src/rules/a11y/*.ts
Both rules now report info severity. Comments describe their HTML conformance and layout-related rationale.
Documentation and release alignment
.changeset/*, docs/src/content/docs/rules/..., docs/src/content/docs/ja/rules/..., docs/blume.translations.json
Rule indexes and detail pages classify both rules as info rules. Japanese translation revisions and minor-release metadata are updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 4a517

This PR lowers the severities of two existing findings and updates their documentation and generated references; the reported validation checks are clean, so no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the two affected rules and the evidence-based scoring change, which matches the main purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@oekazuma

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@oekazuma
oekazuma merged commit e7eec47 into main Aug 17, 2026
8 checks passed
@oekazuma
oekazuma deleted the feat/a11y-severity-evidence branch August 17, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant