You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Accessibility-alt-text-bot
2
2
3
-
This action supports accessible content sharing on GitHub by leaving an automated reminder whenever an image is shared on a GitHub Issue or Pull request without meaningful alternative text (alt text).
3
+
This action supports accessible content sharing on GitHub by leaving an automated reminder whenever an image is shared on a GitHub Issue, Pull request, or Discussion without meaningful alternative text (alt text).
4
4
Alternative text helps convey the context of the image to those who use assistive technologies such as a screen reader and removes accessibility barriers.
5
5
6
6
For guidance on setting alternative text, see [Alternative text for images on Primer](https://primer.style/design/guides/accessibility/alternative-text-for-images).
@@ -24,12 +24,14 @@ on:
24
24
types: [opened, edited]
25
25
issue_comment:
26
26
types: [created, edited]
27
+
discussion:
28
+
types: [created, edited]
27
29
28
30
jobs:
29
31
accessibility_alt_text_bot:
30
32
name: Check alt text is set on issue or pull requests
message="Uh oh! @$comment_owner, the image you shared is missing helpful alt text. Check $target.
44
+
message="Uh oh! @$user, the image you shared is missing helpful alt text. Check $target.
33
45
34
46
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.
35
47
36
48
Learn more about alt text at [Basic writing and formatting syntax: images on GitHub Docs](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)."
37
-
flag="$(flagAltText "$comment")"
49
+
flag="$(flagAltText "$content")"
50
+
51
+
echo $flag
52
+
echo $type
53
+
38
54
if [[ $flag = true ]]; then
39
-
if [[ $is_pr = true ]]; then
40
-
gh pr comment $issue --body "$message"
41
-
else
42
-
gh issue comment $issue --body "$message"
55
+
if [[ $type = pr_comment ]] || [[ $type = pr_description ]]; then
0 commit comments