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

Update and add more test coverage for no-default-alt-text #84

Merged
merged 4 commits into from
Oct 9, 2023

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Oct 6, 2023

In #83, we refactored the rule so we don't rely entirely on Regex for parsing, which was causing the rule to flag images within code blocks. (Edit: Like #84 (comment))

This is a follow-up to that change. I noticed the rule was not correctly flagging the case where there are two images like so:

<img alt="image"/><img alt="image" />

This PR makes a few updates:

  • Added detail to include the alt that is being flagged.
  • Add test coverage and support for when there are multiple image tags in one line.
  • Right now, the test helper doesn't account for how there can be multiple violations in one line. I slightly refactored it so it does, and made subsequent updates in files.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Uh oh! @khiga8, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

1 similar comment
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Uh oh! @khiga8, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Uh oh! @khiga8, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@khiga8 khiga8 marked this pull request as ready for review October 6, 2023 14:01
@khiga8 khiga8 requested a review from a team as a code owner October 6, 2023 14:01
@khiga8 khiga8 changed the title Add more test coverage for no-alt-text Add more test coverage for no-default-alt-text Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Uh oh! @khiga8, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

1 similar comment
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Uh oh! @khiga8, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@khiga8 khiga8 changed the title Add more test coverage for no-default-alt-text Update and add more test coverage for no-default-alt-text Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Uh oh! @khiga8, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@khiga8 khiga8 merged commit c29f004 into main Oct 9, 2023
5 checks passed
@khiga8 khiga8 deleted the kh-add-more-coverge branch October 9, 2023 14:55
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

Successfully merging this pull request may close these issues.

2 participants