Closed EliHowey closed 1 year ago
Supporting CSS style selectors like button[appTooltipLabel]
as suggested is more of a challenge, but I have added an allowList
option in PR #1201 that would let you configure a list of additional attributes, inputs, or attribute directives that would satisfy the content criteria. @EliHowey Does this work for your use case?
@sandikbarr Yes, that should work for us, thank you!
Description and reproduction of the issue
@angular-eslint/template/accessibility-elements-content
is intelligent enough to check whether elements have attributes that would provide an accessible name, likearia-label
. But it currently doesn't provide a way to specify that custom Angular directives can guarantee the existence of one of those attributes. For example, if I have a directive that always setsaria-label
, the rule will still complain:Suggested Change
Add configuration to
@angular-eslint/template/accessibility-elements-content
to ignore certain selectors that guarantee the appropriate element content at runtime, e.g.:Versions
@angular-eslint/eslint-plugin-template
12.7.0
@angular-eslint/template-parser
12.7.0
@typescript-eslint/parser
4.28.2
ESLint
7.32.0
node
14.20.1
ng version
output per the instructions given here.