mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #1972] First line ... a top-level heading, but what about a funky logo with an alt text instead? (Rule MD041) #793
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#793
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @binarykitchen on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1972
Awesome library and great work so far. Totally helped our project very much 🙌
I'm just questioning this rule MD041:
https://github.com/DavidAnson/markdownlint/blob/main/doc/md041.md
Text first isn't very attractive nor inviting. I think an image with alt text as a first like should be accepted as well from a marketing perspective.
And my project is visually oriented for Deaf users, so, has to be an image first.
The first thing in our README.md is the logo image itself, see this example:

And the markdown is:

I've read your documentation and couldn't find any solutions. I am using your latest version:
And this is in our ESLint config:
Happy to discuss further. Thanks again :)
@DavidAnson commented on GitHub (Feb 20, 2026):
Buy omitting a top-level heading at the beginning of the document, you are violating accessibility guidelines such as these:
You are welcome to do so as appropriate for your scenario. If so, I suggest disabling this rule for the relevant documents/project OR considering the HTML approach outlined in the documentation you link to.
@binarykitchen commented on GitHub (Feb 20, 2026):
Thanks, @DavidAnson
(the https://usability.yale.edu link does not work - server down?)
How about we take a step back? I am Deaf myself and have used HTML for over 30 years.
Fun question: can you add an image with an alt text/title in a
<h1>heading in Markdown format?I could, but don't want to. It's like running away from a productive discussion, neglecting the root cause.
I do totally honour Tim Berners-Lee vision re: HTML, yet at the same time it's 2026 now while accessibility becomes a bigger issue than before.
Again, I wonder if it's doable to have a first heading with an alt text and image, both? There are plenty of GitHub repositories out there having an image/logo first.
@DavidAnson commented on GitHub (Feb 20, 2026):
Still works for me. It's the top hit of a Google query for "html h1 best practices accessibility yale" if that's easier.
Yes, this is shown and explained in the rule documentation you link to and I reference at the end of my earlier reply.
Yes, and the prevalence of the technique is specifically why this rule allows the h1/img approach.
@binarykitchen commented on GitHub (Feb 20, 2026):
The link works now, must have been a network issue.
I've managed it with
But how can I add an ALT text in here?
@DavidAnson commented on GitHub (Feb 21, 2026):
That's typically what the image description ("logo") is used for: https://spec.commonmark.org/0.31.2/#images
@binarykitchen commented on GitHub (Feb 21, 2026):
Nice, I didn't know about that. Thank you very much.