Skip to content

feat(lint/html): add useIframeTitle#8270

Merged
dyc3 merged 12 commits intobiomejs:nextfrom
lucasweng:feat/lint/html/useIframeTitle
Nov 29, 2025
Merged

feat(lint/html): add useIframeTitle#8270
dyc3 merged 12 commits intobiomejs:nextfrom
lucasweng:feat/lint/html/useIframeTitle

Conversation

@lucasweng
Copy link
Contributor

@lucasweng lucasweng commented Nov 26, 2025

Summary

This PR is a subtask of #8155. It ports the useIframeTitle rule to HTML.

Closes #8273

Test Plan

  • Added snapshot tests for valid and invalid cases for .html, .vue, .svelte and .astro files

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

🦋 Changeset detected

Latest commit: 5913c64

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added A-Linter Area: linter L-HTML Language: HTML and super languages labels Nov 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Adds a new accessibility lint rule UseIframeTitle that enforces a non-empty title attribute on iframe elements. The rule is implemented as a new public module and registered in the A11y lint group, with file-extension-aware matching (case-insensitive for HTML, lowercase-only for component files). New tests cover valid/invalid cases across HTML, Vue, Svelte and Astro. A changeset entry was added to bump the @biomejs/biome package minor version. No other public signatures were removed or modified.

Possibly related PRs

Suggested reviewers

  • dyc3
  • ematipico

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(lint/html): add useIframeTitle' clearly and concisely describes the main change: adding a new HTML linting rule.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose, scope, linked issues, and test plan for the useIframeTitle rule implementation.
Linked Issues check ✅ Passed The PR description references issue #8273 and indicates it closes that issue, and the changes comprehensively implement the useIframeTitle rule for HTML as described.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the useIframeTitle lint rule for HTML, including the rule logic, tests, and a minor test pattern expansion for framework support.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc5c8af and 5913c64.

📒 Files selected for processing (1)
  • crates/biome_html_analyze/src/lint/a11y.rs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_html_analyze/src/lint/a11y.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: autofix
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: End-to-end tests

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html (1)

1-5: Comprehensive test coverage for invalid cases.

The test fixture covers the key invalid scenarios: missing title, empty title, and title attribute without value. Well done!

Consider adding a test case for whitespace-only title to explicitly document this edge case:

 <iframe title=""></iframe>
+<iframe title="   "></iframe>

Based on learnings, test files should use 'invalid' prefix to indicate code reported by the rule.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4186b83 and 61845ee.

⛔ Files ignored due to path filters (2)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (5)
  • .changeset/calm-goats-talk.md (1 hunks)
  • crates/biome_html_analyze/src/lint/a11y.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use the Rust dbg!() macro for debugging output during test execution, and pass the --show-output flag to cargo test to display debug output.
Use snapshot testing with the insta crate for testing in Rust projects. Accept or reject snapshots using cargo insta accept, cargo insta reject, or cargo insta review.
Write doc comments as doc tests in Rust using code blocks with assertions that will be executed during the testing phase.
Use rustdoc inline documentation for rules, assists, and their options. Create corresponding documentation PRs for other documentation updates against the next branch of the website repository.
Set the version metadata field in linter rule implementations to 'next' for newly created rules. Update this field to the new version number when releasing a minor or major version.

Files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
**/.changeset/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Changeset descriptions should be user-facing, use past tense for actions taken (e.g., 'Added new feature'), and present tense for Biome behavior (e.g., 'Biome now supports...'). Include issue links, rule links, and code examples where applicable.

Files:

  • .changeset/calm-goats-talk.md
🧠 Learnings (17)
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : The 'declare_lint_rule!' macro must include a 'version' field set to 'next' to allow flexibility for the actual release version

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules can declare 'domains' field in 'declare_lint_rule!' to specify which domain(s) they belong to (e.g., RuleDomain::Test for testing rules)

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Deprecated rules must include a 'deprecated' field in the 'declare_lint_rule!' macro with the reason for deprecation

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules ported from other ecosystems should include a 'sources' field in the 'declare_lint_rule!' macro with RuleSource metadata (e.g., '::ESLint')

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule names should follow the 'use<Concept>' prefix when a rule's sole intention is to mandate a single concept (e.g., `useValidLang` for valid HTML lang attribute values)

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules can declare a 'recommended' field in 'declare_lint_rule!' to indicate if they should be enabled by default

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : The 'language' field in 'declare_lint_rule!' should be set to the specific JavaScript dialect (jsx, ts, tsx) if the rule only applies to that dialect, otherwise use 'js'

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
  • .changeset/calm-goats-talk.md
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules that provide code actions must declare a 'fix_kind' field in the 'declare_lint_rule!' macro with either 'FixKind::Safe' or 'FixKind::Unsafe'

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules that overwhelmingly apply to a specific framework should be named using 'use<Framework>...' or 'no<Framework>...' prefix (e.g., `noVueReservedProps`)

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules should only have severity set to 'error' if they report hard errors, dangerous code, or accessibility issues; use 'warn' for possibly erroneous code; use 'info' for stylistic suggestions

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules should be implemented with the 'impl Rule for RuleName' trait, including 'run' function that returns signals and optional 'diagnostic' and 'action' functions

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule diagnostic and action functions must set the category using 'rule_category!()' macro instead of dynamically parsing string names

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Code blocks in rule documentation must specify a language and use 'expect_diagnostic' property for invalid snippets that should emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule documentation must have a '## Options' section after the '## Examples' section if the rule supports options, with each option having its own h3 header

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/tests/specs/**/*.{js,ts,tsx,jsx,json,css,graphql} : Test files should use 'invalid' or 'valid' prefixes to indicate whether they contain code reported by the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html
📚 Learning: 2025-11-24T18:03:52.013Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/.changeset/*.md : Changeset descriptions should be user-facing, use past tense for actions taken (e.g., 'Added new feature'), and present tense for Biome behavior (e.g., 'Biome now supports...'). Include issue links, rule links, and code examples where applicable.

Applied to files:

  • .changeset/calm-goats-talk.md
📚 Learning: 2025-11-24T18:03:52.014Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the `just new-changeset` command with appropriate package selection, change type (major/minor/patch), and description.

Applied to files:

  • .changeset/calm-goats-talk.md
🧬 Code graph analysis (2)
crates/biome_html_analyze/src/lint/a11y.rs (1)
crates/biome_html_syntax/src/element_ext.rs (1)
  • name (55-70)
crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs (2)
crates/biome_analyze/src/rule.rs (2)
  • same (246-251)
  • recommended (595-598)
crates/biome_service/src/workspace_types.rs (1)
  • Self (539-539)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: autofix
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
🔇 Additional comments (6)
crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html (1)

1-2: LGTM!

The valid test fixture correctly demonstrates an iframe with a non-empty title attribute.

crates/biome_html_analyze/src/lint/a11y.rs (1)

10-11: LGTM!

The new module and lint group registration follow the established pattern correctly.

.changeset/calm-goats-talk.md (1)

1-19: LGTM!

The changeset follows the required format: past tense for the action taken, clear user-facing description, and helpful code examples.

As per coding guidelines, changeset descriptions should be user-facing and use past tense for actions taken.

crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs (3)

10-44: LGTM! Excellent rule metadata.

The declare_lint_rule! macro is properly configured with all required fields. The documentation is clear, includes both invalid and valid examples with appropriate expect_diagnostic markers, and references WCAG guidelines.

As per coding guidelines, the version field is correctly set to 'next' for newly created rules, and the severity is appropriately set to Error for accessibility issues.


46-85: LGTM! Solid implementation.

The rule logic correctly handles all edge cases:

  • Missing title attribute
  • Title attribute without value (handled via initializer() returning None)
  • Empty or whitespace-only title strings

The diagnostic message is clear and educational.


87-91: LGTM!

The helper function correctly identifies iframe elements with case-insensitive matching, which is appropriate for HTML.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.changeset/calm-goats-talk.md (1)

5-10: Consider adding the issue reference.

The changeset is well-written with excellent examples, but per coding guidelines, consider adding a reference to the issue this closes (e.g., "Closes #8273" or a link).

Apply this diff:

-Added the `useIframeTitle` lint rule for HTML. The rule enforces the usage of the `title` attribute for the `iframe` element.
+Added the `useIframeTitle` lint rule for HTML. The rule enforces the usage of the `title` attribute for the `iframe` element. Closes #8273.
 
 In `.html` files, this rule matches `iframe` elements case-insensitively (e.g., `<IFRAME>`, `<IFrame>`).
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61845ee and 88135dc.

⛔ Files ignored due to path filters (8)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/invalid.astro.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/valid.astro.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/invalid.svelte.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/valid.svelte.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/valid.vue.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (11)
  • .changeset/calm-goats-talk.md (1 hunks)
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/invalid.astro (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/valid.astro (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/invalid.svelte (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/valid.svelte (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/valid.vue (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/valid.svelte
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/valid.astro
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use the Rust dbg!() macro for debugging output during test execution, and pass the --show-output flag to cargo test to display debug output.
Use snapshot testing with the insta crate for testing in Rust projects. Accept or reject snapshots using cargo insta accept, cargo insta reject, or cargo insta review.
Write doc comments as doc tests in Rust using code blocks with assertions that will be executed during the testing phase.
Use rustdoc inline documentation for rules, assists, and their options. Create corresponding documentation PRs for other documentation updates against the next branch of the website repository.
Set the version metadata field in linter rule implementations to 'next' for newly created rules. Update this field to the new version number when releasing a minor or major version.

Files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
**/.changeset/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Changeset descriptions should be user-facing, use past tense for actions taken (e.g., 'Added new feature'), and present tense for Biome behavior (e.g., 'Biome now supports...'). Include issue links, rule links, and code examples where applicable.

Files:

  • .changeset/calm-goats-talk.md
🧠 Learnings (29)
📚 Learning: 2025-11-24T18:05:20.343Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.343Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/spec_tests.rs : Use the `tests_macros::gen_tests!` macro in `spec_tests.rs` to generate test functions for each specification file matching the pattern `tests/specs/<language>/**/*.<ext>`

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:06:12.017Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.017Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Implement watcher tests for workspace methods in watcher.tests.rs and end-to-end tests in LSP tests

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/tests/specs/**/*.{js,ts,tsx,jsx,json,css,graphql} : Test files should use 'invalid' or 'valid' prefixes to indicate whether they contain code reported by the rule

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/invalid.astro
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/valid.vue
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/invalid.vue
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/invalid.svelte
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/tests/specs/**/*.{js,ts,tsx,jsx,json,css,graphql} : Test files for rules should be placed inside 'tests/specs/' directory organized by group and rule name (e.g., 'tests/specs/nursery/myRuleName/')

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Multi-file documentation snippets should use 'file=<path>' property to create an in-memory file system for testing cross-file rule behavior

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:05:20.343Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.343Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/Cargo.toml : Include development dependencies in `Cargo.toml` for formatter tests: `biome_formatter_test`, `biome_<language>_factory`, `biome_<language>_parser`, `biome_parser`, `biome_service`, `countme`, `iai`, `quickcheck`, `quickcheck_macros`, and `tests_macros`

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules that overwhelmingly apply to a specific framework should be named using 'use<Framework>...' or 'no<Framework>...' prefix (e.g., `noVueReservedProps`)

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules ported from other ecosystems should include a 'sources' field in the 'declare_lint_rule!' macro with RuleSource metadata (e.g., '::ESLint')

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
  • .changeset/calm-goats-talk.md
📚 Learning: 2025-11-24T18:05:20.343Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.343Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/language.rs : Implement `TestFormatLanguage` trait in `tests/language.rs` for the formatter's test language

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule implementation should use 'Type Query = Ast<NodeType>' to query the AST/CST for specific node types

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:05:20.343Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.343Z
Learning: Create test infrastructure with `tests/specs` folder structure and `spec_test.rs`, `spec_tests.rs`, and `language.rs` files in test directories

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:03:52.013Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/*.rs : Use the Rust `dbg!()` macro for debugging output during test execution, and pass the `--show-output` flag to `cargo test` to display debug output.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:03:52.013Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/*.rs : Write doc comments as doc tests in Rust using code blocks with assertions that will be executed during the testing phase.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:05:20.343Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.343Z
Learning: Create specification test files in `tests/specs/<language>/` directories with one or more test files; use `cargo insta accept` or `cargo insta review` to accept/reject snapshots

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:03:52.014Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: Before committing and opening a PR, run `just f` to format Rust and TOML files, `just l` to lint the whole project, and run appropriate code generation commands (`just gen-analyzer` for linter work, `just gen-bindings` for workspace work).

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule documentation must include a '## Examples' header followed by '### Invalid' and '### Valid' sections, with '### Invalid' appearing first

Applied to files:

  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/invalid.astro
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/invalid.svelte
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : The 'language' field in 'declare_lint_rule!' should be set to the specific JavaScript dialect (jsx, ts, tsx) if the rule only applies to that dialect, otherwise use 'js'

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
  • .changeset/calm-goats-talk.md
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : The 'declare_lint_rule!' macro must include a 'version' field set to 'next' to allow flexibility for the actual release version

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule names should follow the 'use<Concept>' prefix when a rule's sole intention is to mandate a single concept (e.g., `useValidLang` for valid HTML lang attribute values)

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules can declare 'domains' field in 'declare_lint_rule!' to specify which domain(s) they belong to (e.g., RuleDomain::Test for testing rules)

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Deprecated rules must include a 'deprecated' field in the 'declare_lint_rule!' macro with the reason for deprecation

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules can declare a 'recommended' field in 'declare_lint_rule!' to indicate if they should be enabled by default

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule documentation must have a '## Options' section after the '## Examples' section if the rule supports options, with each option having its own h3 header

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules that provide code actions must declare a 'fix_kind' field in the 'declare_lint_rule!' macro with either 'FixKind::Safe' or 'FixKind::Unsafe'

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rule diagnostic and action functions must set the category using 'rule_category!()' macro instead of dynamically parsing string names

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules should be implemented with the 'impl Rule for RuleName' trait, including 'run' function that returns signals and optional 'diagnostic' and 'action' functions

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Code blocks in rule documentation must specify a language and use 'expect_diagnostic' property for invalid snippets that should emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs
📚 Learning: 2025-11-24T18:03:52.013Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/.changeset/*.md : Changeset descriptions should be user-facing, use past tense for actions taken (e.g., 'Added new feature'), and present tense for Biome behavior (e.g., 'Biome now supports...'). Include issue links, rule links, and code examples where applicable.

Applied to files:

  • .changeset/calm-goats-talk.md
  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html
📚 Learning: 2025-09-25T12:32:59.003Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7593
File: crates/biome_service/src/workspace/server.rs:1306-1306
Timestamp: 2025-09-25T12:32:59.003Z
Learning: In the biomejs/biome project, do not flag compilation errors during code review as they are handled by the existing test infrastructure and CI. Focus on other code quality aspects instead.

Applied to files:

  • crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html
🧬 Code graph analysis (2)
crates/biome_html_analyze/tests/spec_tests.rs (1)
crates/tests_macros/src/lib.rs (1)
  • gen_tests (305-312)
crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs (2)
crates/biome_analyze/src/rule.rs (3)
  • sources (610-613)
  • same (246-251)
  • recommended (595-598)
crates/biome_rowan/src/syntax/token.rs (1)
  • token_text (121-123)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Check Dependencies
  • GitHub Check: Validate rules documentation
  • GitHub Check: autofix
🔇 Additional comments (11)
crates/biome_html_analyze/tests/spec_tests.rs (1)

16-17: LGTM! Test pattern expansion is spot on.

The additional file extensions (vue, svelte, astro) properly enable the test suite to discover and run your new framework-specific test fixtures.

crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/astro/invalid.astro (1)

1-4: Good test coverage for Astro invalid cases.

The fixture correctly uses lowercase iframe only (as frameworks treat PascalCase as custom components) and covers the key invalid scenarios: missing title, empty elements, and empty title attributes.

crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/valid.vue (1)

1-3: Excellent demonstration of framework-aware behaviour.

Line 3's <Iframe /> correctly validates that PascalCase variants are treated as custom components and ignored by the rule—good test design.

crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/valid.html (1)

1-3: Nice case-insensitive HTML validation.

Line 3's <Iframe> variant properly tests that HTML files support case-insensitive matching, distinguishing the HTML behaviour from framework files.

crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/vue/invalid.vue (1)

1-4: Well-structured Vue invalid cases.

The test fixture correctly uses lowercase iframe only and covers the essential invalid scenarios for Vue contexts.

crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/invalid.html (1)

1-6: Excellent edge case coverage.

The test cases properly address the case-insensitive HTML behaviour discussed in earlier reviews. Line 4's <iframe title> (attribute without value) and line 6's <IFRAME> are particularly good edge cases.

crates/biome_html_analyze/tests/specs/a11y/useIframeTitle/svelte/invalid.svelte (1)

1-4: Solid Svelte test coverage.

The fixture correctly uses lowercase iframe only and covers the key invalid scenarios for Svelte contexts.

crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs (4)

1-8: Imports look good.

All necessary dependencies are present for the rule implementation.


10-106: Excellent rule documentation.

The rule metadata follows all guidelines, and the documentation is comprehensive with clear examples across multiple frameworks.


114-120: I'll verify the concerns raised in the review comment by examining the implementation and test coverage.
<function_calls>


#!/bin/bash

Read the implementation file to understand context

cat -n crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs | head -160


</function_calls>


#!/bin/bash

Find test files for this rule

fd -t f -e md -e rs useIframeTitle crates/biome_html_analyze/tests/


</function_calls>


#!/bin/bash

Check if the specs directory exists and what test files are there

find crates/biome_html_analyze/tests -type d -name "iframe" -o -type f -name "iframe"


</function_calls>


#!/bin/bash

Search for test references to use_iframe_title rule

rg -i "use_iframe_title|useIframeTitle" crates/biome_html_analyze/tests/ -A 2 -B 2


</function_calls>


#!/bin/bash

Check the file_path and extension handling more broadly in the codebase

rg -n "file_path.*extension" crates/biome_html_analyze/src/ -B 3 -A 3 --type rs


</function_calls>


112-112: I'm unable to access the repository to verify this concern due to persistent cloning failures. However, based on the retrieved learnings from the Biome codebase:

The learning from PR 8171 in the same codebase indicates that each lint rule has its own options type declaration (e.g., type Options = RuleNameOptions) as part of the codegen process, even if the options struct is empty or unused. This is standard practice.

Since I cannot directly verify whether UseIframeTitleOptions is actually used in the run() function or if it follows this codegen pattern, and given that the learnings suggest this is expected behavior in Biome lint rules, I must defer to manual verification.

Comment on lines 35 to 57
/// ```vue,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```vue,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
///
/// ```svelte,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```svelte,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
///
/// ```astro,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```astro,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @ematipico, could use your help looking into this issue when you have a moment 🙏🏻

cargo run -p rules_check throws an error when parsing vue,expect_diagnostic, svelte,expect_diagnostic and astro,expect_diagnostic

Error: Analysis of 'a11y/useIframeTitle' on the following code block returned 0 diagnostics, but a single diagnostic was expected.

<iframe></iframe>

cargo test -p biome_html_analyze -- use_iframe_title --show-output correctly generate snapshot results

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because we haven't set up the rules check to check those blocks properly yet. This is another reason in addition to #8270 (comment) that I recommend leaving out the html-ish language blocks from the documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @dyc3, I removed those code blocks 1d4fd36

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dyc3 it might be worth adding this useful tip in the umbrella issue

Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Just some notes on comms.

Comment on lines 11 to 55
Invalid:

```html
<iframe></iframe>
<iframe title></iframe>
<iframe title=""></iframe>
<IFRAME></IFRAME>
```

```vue
<iframe></iframe>
<iframe title=""></iframe>
```

```svelte
<iframe></iframe>
<iframe title=""></iframe>
```

```astro
<iframe></iframe>
<iframe title=""></iframe>
```

Valid:

```html
<iframe title="title"></iframe>
<Iframe title="title"></Iframe>
```

```vue
<iframe title="title"></iframe>
<Iframe />
```

```svelte
<iframe title="title"></iframe>
<Iframe />
```

```astro
<iframe title="title"></iframe>
<Iframe />
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this much detail in the changeset. The changeset is not documentation, its to give users a heads up about what's new, and then they can dig deeper if they need to. There is such a thing as information overload.

I would keep it simple and have a single invalid case, and a single valid case in this instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated 09ed552, thanks

Comment on lines 7 to 9
In `.html` files, this rule matches `iframe` elements case-insensitively (e.g., `<IFRAME>`, `<IFrame>`).

In component-based frameworks (Vue, Svelte, Astro), only lowercase `<iframe>` is checked. PascalCase variants like `<Iframe>` are assumed to be custom components and are ignored.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would even go as far to say that we could omit these lines too. It's an implementation detail.

Comment on lines 23 to 57
/// ```html,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```html,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
///
/// ```html,expect_diagnostic
/// <IFRAME></IFRAME>
/// ```
///
/// ```vue,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```vue,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
///
/// ```svelte,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```svelte,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
///
/// ```astro,expect_diagnostic
/// <iframe></iframe>
/// ```
///
/// ```astro,expect_diagnostic
/// <iframe title=""></iframe>
/// ```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, tbh. Too many examples. We should demonstrate that when title​ is missing its invalid, and when title​ is empty its invalid.

While the documentation is tested, its not unit tests. Too much information can harm clarity.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/calm-goats-talk.md (1)

1-19: Simplify examples and add issue/rule links.

The description looks good, but per previous feedback, keep the code examples to just one invalid and one valid case—the second invalid example is redundant. Also, consider adding links to the related issue and rule documentation to help users find more information.

Based on learnings and coding guidelines, changesets should include issue links and rule links where applicable.

 ---
 "@biomejs/biome": minor
 ---
 
 Added the `useIframeTitle` lint rule for HTML. The rule enforces the usage of the `title` attribute for the `iframe` element.
 
+Closes #8273. See the [rule documentation](https://biomejs.dev/linter/rules/use-iframe-title) for details.
+
 Invalid:
 
 ```html
 <iframe></iframe>
-<iframe title=""></iframe>

Valid:

<iframe title="title"></iframe>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 81b8b2d14d94543c3e01097c1c104c125dd13060 and cf290ddcf46042f236499988f56f4b21f4779620.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `.changeset/calm-goats-talk.md` (1 hunks)
* `crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* crates/biome_html_analyze/src/lint/a11y/use_iframe_title.rs

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>📓 Path-based instructions (1)</summary>

<details>
<summary>**/.changeset/*.md</summary>


**📄 CodeRabbit inference engine (CONTRIBUTING.md)**

> Changeset descriptions should be user-facing, use past tense for actions taken (e.g., 'Added new feature'), and present tense for Biome behavior (e.g., 'Biome now supports...'). Include issue links, rule links, and code examples where applicable.

Files:
- `.changeset/calm-goats-talk.md`

</details>

</details><details>
<summary>🧠 Learnings (5)</summary>

<details>
<summary>📚 Learning: 2025-11-24T18:03:52.013Z</summary>

Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/.changeset/*.md : Changeset descriptions should be user-facing, use past tense for actions taken (e.g., 'Added new feature'), and present tense for Biome behavior (e.g., 'Biome now supports...'). Include issue links, rule links, and code examples where applicable.


**Applied to files:**
- `.changeset/calm-goats-talk.md`

</details>
<details>
<summary>📚 Learning: 2025-11-24T18:03:52.014Z</summary>

Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the just new-changeset command with appropriate package selection, change type (major/minor/patch), and description.


**Applied to files:**
- `.changeset/calm-goats-talk.md`

</details>
<details>
<summary>📚 Learning: 2025-11-24T18:04:42.146Z</summary>

Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze//biome_*_analyze/lib/src//!(mod).rs : The 'language' field in 'declare_lint_rule!' should be set to the specific JavaScript dialect (jsx, ts, tsx) if the rule only applies to that dialect, otherwise use 'js'


**Applied to files:**
- `.changeset/calm-goats-talk.md`

</details>
<details>
<summary>📚 Learning: 2025-11-24T18:04:42.146Z</summary>

Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze//biome_*_analyze/lib/src//!(mod).rs : Rules ported from other ecosystems should include a 'sources' field in the 'declare_lint_rule!' macro with RuleSource metadata (e.g., '::ESLint')


**Applied to files:**
- `.changeset/calm-goats-talk.md`

</details>
<details>
<summary>📚 Learning: 2025-11-24T18:04:42.146Z</summary>

Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze//biome_*_analyze/lib/src//!(mod).rs : The 'declare_lint_rule!' macro must include a 'version' field set to 'next' to allow flexibility for the actual release version


**Applied to files:**
- `.changeset/calm-goats-talk.md`

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)</summary>

* GitHub Check: Documentation
* GitHub Check: End-to-end tests
* GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
* GitHub Check: Lint project (depot-windows-2022)
* GitHub Check: Test (depot-ubuntu-24.04-arm-16)
* GitHub Check: Test (depot-windows-2022-16)
* GitHub Check: Check Dependencies
* GitHub Check: autofix

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@dyc3 dyc3 merged commit 4f7909d into biomejs:next Nov 29, 2025
13 checks passed
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-HTML Language: HTML and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants