-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
Rule details
The rule should warn when an image is missing alternate text
What type of rule is this?
Warns about a potential problem
Example code
Example of incorrect code:
![]()
![][ref]
[ref]: image.jpg
Participation
- I am willing to submit a pull request to implement this rule.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Additional comments
Rationale: Alternate text is important for accessibility and describes the content of an image for people who may not be able to see it.
Metadata
Metadata
Assignees
Type
Projects
Status
Complete
Milestone
Relationships
Development
Select code repository
Activity
lumirlumir commentedon May 8, 2025
Hi @Pixel998, thanks for opening this issue!
It looks great to me, and I agree that this rule should be implemented as part of the recommended setup.
Interestingly, I’ve actually implemented this rule in my own custom ESLint plugin,
eslint-plugin-mark
, which I’m currently working on.So, if you are open to it, and if other team members are also on board with including this rule, would it be alright if I took on this issue?
Pixel998 commentedon May 8, 2025
Hi @lumirlumir, I've implemented the rule locally. Just need to write the docs and push if it's accepted. Also, I was thinking this rule should primarily focus on Markdown's image alt text. If we want to also check the html alt attribute, it might be best to include that as an optional setting.
nzakas commentedon May 8, 2025
I think this is a good idea. 👍 Let's let @Pixel998 work on this as they created the issue and indicated interest in implementing it.
lumirlumir commentedon May 8, 2025
Sounds good. Let's do it.