Skip to content

Commit f40b8dd

Browse files
committed
Switch to include? instead of start_with? since it's not technically a requirement though recommended
1 parent 848ce2e commit f40b8dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/erblint-github/linters/github/accessibility/avoid_generic_link_text_counter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def banned_text?(text)
116116
end
117117

118118
def valid_accessible_name?(aria_label, text)
119-
aria_label.start_with?(text)
119+
aria_label.downcase.include?(text.downcase)
120120
end
121121

122122
# Checks if Ruby node contains `aria-label` or `aria-labelledby`

0 commit comments

Comments
 (0)