in app/components/primer/component.rb [101:109]
def deny_aria_label(tag:, arguments:)
return arguments.except!(:skip_aria_label_check) if arguments[:skip_aria_label_check]
return if arguments[:role]
return unless aria(:label, arguments)
return unless INVALID_ARIA_LABEL_TAGS.include?(tag)
raise ArgumentError, "Don't use `aria-label` on `#{tag}` elements. See https://www.tpgi.com/short-note-on-aria-label-aria-labelledby-and-aria-describedby/" if should_raise_aria_error?
end