Repository navigation
fix(settings): use setHeading for the settings entry page sections - #669
Merged
Merged
Conversation
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.
4 of 8 tasks
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.
4 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Obsidian review action (
obsidianmd/obsidian-workflows@v1, #626) raisesobsidianmd/settings-tab/no-manual-html-headingsto an error for heading elements created inside aPluginSettingTab. The settings entry page (TaskProgressBarSettingTab) created three: oneh2and twoh3.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
new Setting(container).setName(...).setHeading(), as the rule asks. The oldh3rules insettings-modal.scssare replaced by a small adjustment to.setting-item-headingthat keeps the same bottom margin and removes the border and padding.div.settings-entry-titlewithrole="heading"andaria-level="2". It keeps the same styles, and screen readers still treat it as a heading.Verification
src/has 0 error-level findings.tscpasses.Type of Change
Checklist