Skip to content

Fix MD001 heading level violations in winforms/advanced#2197

Merged
adegeo merged 1 commit intodotnet:mainfrom
apoorvdarshan:fix/md001-heading-levels-winforms-advanced
Feb 26, 2026
Merged

Fix MD001 heading level violations in winforms/advanced#2197
adegeo merged 1 commit intodotnet:mainfrom
apoorvdarshan:fix/md001-heading-levels-winforms-advanced

Conversation

@apoorvdarshan
Copy link
Contributor

@apoorvdarshan apoorvdarshan commented Feb 17, 2026

Summary

  • Fix 35 MD001 (heading-increment) violations across 26 files in dotnet-desktop-guide/winforms/advanced/
  • Headings that skipped levels (e.g., #### or ######) are corrected to increment by one level at a time
  • This improves accessibility for screen readers and assistive technologies

Partial fix for #29

Files changed

All 26 files are in dotnet-desktop-guide/winforms/advanced/. The most common pattern fixed:

  • ### Procedure heading## Procedure heading (after an # H1 title)
  • #### Step heading### Step heading (after a ## H2 section)

Test plan

  • Verify headings render correctly on docs.microsoft.com
  • Confirm no heading hierarchy regressions in changed files

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
dotnet-desktop-guide/winforms/advanced/com-interop-by-displaying-a-windows-form-shadow.md dotnet-desktop-guide/winforms/advanced/com-interop-by-displaying-a-windows-form-shadow
dotnet-desktop-guide/winforms/advanced/how-to-align-drawn-text.md dotnet-desktop-guide/winforms/advanced/how-to-align-drawn-text
dotnet-desktop-guide/winforms/advanced/how-to-arrange-mdi-child-forms.md dotnet-desktop-guide/winforms/advanced/how-to-arrange-mdi-child-forms
dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions.md dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions
dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-an-existing-setting-at-design-time.md dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-an-existing-setting-at-design-time
dotnet-desktop-guide/winforms/advanced/how-to-choose-the-printers-attached-to-user-computer-in-windows-forms.md dotnet-desktop-guide/winforms/advanced/how-to-choose-the-printers-attached-to-user-computer-in-windows-forms
dotnet-desktop-guide/winforms/advanced/how-to-create-a-path-gradient.md dotnet-desktop-guide/winforms/advanced/how-to-create-a-path-gradient
dotnet-desktop-guide/winforms/advanced/how-to-create-application-settings.md dotnet-desktop-guide/winforms/advanced/how-to-create-application-settings
dotnet-desktop-guide/winforms/advanced/how-to-create-graphics-objects-for-drawing.md dotnet-desktop-guide/winforms/advanced/how-to-create-graphics-objects-for-drawing
dotnet-desktop-guide/winforms/advanced/how-to-determine-the-active-mdi-child.md dotnet-desktop-guide/winforms/advanced/how-to-determine-the-active-mdi-child
dotnet-desktop-guide/winforms/advanced/how-to-draw-cardinal-splines.md dotnet-desktop-guide/winforms/advanced/how-to-draw-cardinal-splines
dotnet-desktop-guide/winforms/advanced/how-to-draw-text-at-a-specified-location.md dotnet-desktop-guide/winforms/advanced/how-to-draw-text-at-a-specified-location
dotnet-desktop-guide/winforms/advanced/how-to-draw-wrapped-text-in-a-rectangle.md dotnet-desktop-guide/winforms/advanced/how-to-draw-wrapped-text-in-a-rectangle
dotnet-desktop-guide/winforms/advanced/how-to-flatten-a-curved-path-into-a-line.md dotnet-desktop-guide/winforms/advanced/how-to-flatten-a-curved-path-into-a-line
dotnet-desktop-guide/winforms/advanced/how-to-manually-manage-buffered-graphics.md dotnet-desktop-guide/winforms/advanced/how-to-manually-manage-buffered-graphics
dotnet-desktop-guide/winforms/advanced/how-to-manually-render-buffered-graphics.md dotnet-desktop-guide/winforms/advanced/how-to-manually-render-buffered-graphics
dotnet-desktop-guide/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications.md dotnet-desktop-guide/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications
dotnet-desktop-guide/winforms/advanced/how-to-print-graphics-in-windows-forms.md dotnet-desktop-guide/winforms/advanced/how-to-print-graphics-in-windows-forms
dotnet-desktop-guide/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls.md dotnet-desktop-guide/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls
dotnet-desktop-guide/winforms/advanced/how-to-render-images-with-gdi.md dotnet-desktop-guide/winforms/advanced/how-to-render-images-with-gdi
dotnet-desktop-guide/winforms/advanced/how-to-send-data-to-the-active-mdi-child.md dotnet-desktop-guide/winforms/advanced/how-to-send-data-to-the-active-mdi-child
dotnet-desktop-guide/winforms/advanced/how-to-set-pen-width-and-alignment.md dotnet-desktop-guide/winforms/advanced/how-to-set-pen-width-and-alignment
dotnet-desktop-guide/winforms/advanced/how-to-tile-a-shape-with-an-image.md dotnet-desktop-guide/winforms/advanced/how-to-tile-a-shape-with-an-image
dotnet-desktop-guide/winforms/advanced/how-to-validate-application-settings.md dotnet-desktop-guide/winforms/advanced/how-to-validate-application-settings
dotnet-desktop-guide/winforms/advanced/walkthrough-creating-an-accessible-windows-based-application.md dotnet-desktop-guide/winforms/advanced/walkthrough-creating-an-accessible-windows-based-application
dotnet-desktop-guide/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms.md dotnet-desktop-guide/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms

Fix heading levels that skip levels (e.g., h1 -> h3 or h2 -> h4) to
increment by one level at a time, improving accessibility compliance.

Fixes 35 violations across 26 files in dotnet-desktop-guide/winforms/advanced/.

Partial fix for dotnet#29
@apoorvdarshan apoorvdarshan force-pushed the fix/md001-heading-levels-winforms-advanced branch from d852e7f to 33b61cc Compare February 17, 2026 06:35
@apoorvdarshan
Copy link
Contributor Author

@dotnet-policy-service agree

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes 35 MD001 (heading-increment) violations across 26 Markdown files in the dotnet-desktop-guide/winforms/advanced/ directory. The changes correct heading hierarchies that skip levels, ensuring headings increment by one level at a time (e.g., H1→H2→H3 instead of H1→H3 or H2→H4). This improves accessibility for screen readers and assistive technologies, as proper heading structure allows users to navigate documents more effectively.

Changes:

  • Updated procedure headings from H3 to H2 in "how-to" articles where they directly follow H1 titles
  • Updated procedure headings from H4 to H3 in walkthrough articles where they appear under H2 sections
  • Maintained all existing heading text and content, only adjusting heading levels

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
walkthrough-performing-a-drag-and-drop-operation-in-windows-forms.md Fixed H4→H3 for procedure headings under H2 sections
walkthrough-creating-an-accessible-windows-based-application.md Fixed H4→H3 for procedure headings under H2 sections
how-to-validate-application-settings.md Fixed H3→H2 for procedure heading after H1 title
how-to-tile-a-shape-with-an-image.md Fixed H3→H2 for procedure heading after H1 title
how-to-set-pen-width-and-alignment.md Fixed H3→H2 for procedure heading after H1 title
how-to-send-data-to-the-active-mdi-child.md Fixed H3→H2 for procedure heading after H1 title
how-to-render-images-with-gdi.md Fixed H3→H2 for procedure heading after H1 title
how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls.md Fixed H3→H2 for procedure heading after H1 title
how-to-print-graphics-in-windows-forms.md Fixed H3→H2 for procedure heading after H1 title
how-to-perform-drag-and-drop-operations-between-applications.md Fixed H3→H2 for procedure heading after H1 title
how-to-manually-render-buffered-graphics.md Fixed H3→H2 for procedure heading after H1 title
how-to-manually-manage-buffered-graphics.md Fixed H3→H2 for procedure heading after H1 title
how-to-flatten-a-curved-path-into-a-line.md Fixed H3→H2 for procedure heading after H1 title
how-to-draw-wrapped-text-in-a-rectangle.md Fixed H3→H2 for procedure heading after H1 title
how-to-draw-text-at-a-specified-location.md Fixed H3→H2 for procedure heading after H1 title
how-to-draw-cardinal-splines.md Fixed H3→H2 for procedure heading after H1 title
how-to-determine-the-active-mdi-child.md Fixed H3→H2 for procedure heading after H1 title
how-to-create-graphics-objects-for-drawing.md Fixed H4→H3 for procedure headings under H2 sections
how-to-create-application-settings.md Fixed H3→H2 for procedure heading after H1 title
how-to-create-a-path-gradient.md Fixed H3→H2 for procedure heading after H1 title
how-to-choose-the-printers-attached-to-user-computer-in-windows-forms.md Fixed H3→H2 for procedure heading after H1 title
how-to-change-the-value-of-an-existing-setting-at-design-time.md Fixed H3→H2 for procedure heading after H1 title
how-to-change-the-value-of-a-setting-between-application-sessions.md Fixed H3→H2 for procedure heading after H1 title
how-to-arrange-mdi-child-forms.md Fixed H3→H2 for procedure heading after H1 title
how-to-align-drawn-text.md Fixed H3→H2 for procedure heading after H1 title
com-interop-by-displaying-a-windows-form-shadow.md Fixed H4→H3 for procedure heading under H2 section

@adegeo
Copy link
Contributor

adegeo commented Feb 17, 2026

Hello! I'm curious why you picked up this issue when Copilot has already started working on it?

EDIT: Was there a specific reason to do so? I do see that the other issue was linked to one closed as a duplicate, however, it fixes all 222 files. I'll merge that first and then see what we can do about this one. Thanks!

@apoorvdarshan
Copy link
Contributor Author

Hi @adegeo ! I wasn't aware that Copilot was already working on a broader fix for this. I picked it up from issue #29 and started working on it independently. Happy to close this PR if the larger fix covers these files. Thanks for letting me know!

@adegeo
Copy link
Contributor

adegeo commented Feb 17, 2026

Ok no worries! Thanks! It was just odd timing that the issue has been open for 6 years and I had copilot jump in a week or so ago and then you also showed up :D I wasn't sure if you were a bot.

@adegeo adegeo merged commit 731cd9f into dotnet:main Feb 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants