Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers should be removed from markdown formatting #2805

Open
clarfonthey opened this issue Aug 5, 2024 · 2 comments
Open

Headers should be removed from markdown formatting #2805

clarfonthey opened this issue Aug 5, 2024 · 2 comments

Comments

@clarfonthey
Copy link

Pitch

Commonmark includes # header formatting which emits h1-6 tags, but these shouldn't be allowed in posts. An acceptable solution may be to simply replace usages of these tags with bold paragraphs instead, or to simply not process them into HTML entirely. (I'd imagine that there's some special formatting to avoid converting hashtags into headers, so, maybe that could be leveraged here.)

Motivation

Header tags mess with the document outline and thus mess with screen readers, and people are using them to simply emphasise their text, which is not their purpose. I also wrote a larger post about this which may have more insight into this in the replies: https://toot.cat/@clarfonthey/112911895092049070

@MagicLike
Copy link

I did not know this, did it a few times, but will now refrain from using it - I support the exclusion of header formatting 👍

@RokeJulianLockhart
Copy link

#2805 (comment)

@clarfonthey, usage of non-sematic HTML isn't a reason to remove it, else we'd remove <code> to prevent those who utilise it in the stead of quotation marks (") too.

I suggest that to remediate this problem, all #s – <h1>s to <h6>s – be converted into <h4>s (as is standard) or <h6>s 1 at parse-time.

However, this may be premature, per whatwg/html#7390 (comment). If you don't consider it so, perhaps attempt to incentivise users to utilise the undermentioned CommonMark syntax:

Heading Content
---------------
Body text.

...because this can be interpreted by the parser as whichever h.* tag is most suitable (ideally, whichever corresponds to 1 rem).

Footnotes

  1. stackoverflow.com/revisions/36483225/11:

    forum.qt.io's NodeBB instance adheres to this.

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

No branches or pull requests

3 participants