Skip to content

fix(settings): use setHeading for the settings entry page sections - #669

Merged
Quorafind merged 2 commits into
masterfrom
fix/settings-entry-headings
Nov 28, 2026
Merged

Quorafind merged 2 commits into
masterfrom
fix/settings-entry-headings

Conversation

@Quorafind

Copy link
Copy Markdown
Member

Description

The Obsidian review action (obsidianmd/obsidian-workflows@v1, #626) raises obsidianmd/settings-tab/no-manual-html-headings to an error for heading elements created inside a PluginSettingTab. The settings entry page (TaskProgressBarSettingTab) created three: one h2 and two h3.

In advisory mode these errors were downgraded to warnings and hidden by GitHub's limit of 10 warning annotations per step. They are among the errors that fail strict mode (#667).

Changes

  • "Quick Links" and "Features": these are settings section headings, so they now use new Setting(container).setName(...).setHeading(), as the rule asks. The old h3 rules in settings-modal.scss are replaced by a small adjustment to .setting-item-heading that keeps the same bottom margin and removes the border and padding.
  • "Task Genius" in the page header: this is the product title next to the logo and version, not a settings section, so it stays a custom element. It becomes div.settings-entry-title with role="heading" and aria-level="2". It keeps the same styles, and screen readers still treat it as a heading.

Verification

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • I have read and agree to the CLA
  • My code follows the project's style guidelines
  • I have tested my changes
  • I have updated the documentation (not applicable)

The Obsidian review action raises
obsidianmd/settings-tab/no-manual-html-headings to an error for heading
elements created inside a PluginSettingTab.

- "Quick Links" and "Features" are settings section headings: render
  them with new Setting(...).setName(...).setHeading().
- "Task Genius" in the page header is the product title next to the
  logo and version, not a section heading: render it as a styled div
  with role="heading" / aria-level="2" so it keeps its look and its
  meaning for screen readers.
Setting headings get 16px inline padding in Obsidian 1.15's settings
window, which indented "Quick Links" and "Features" relative to the
cards below them. Clear all padding, as the old h3 had.
@Quorafind
Quorafind merged commit 3900a66 into master Nov 28, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant