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

Add generic attr-non-space-content evaluate method #2192

Closed
WilcoFiers opened this issue Apr 28, 2020 · 2 comments
Closed

Add generic attr-non-space-content evaluate method #2192

WilcoFiers opened this issue Apr 28, 2020 · 2 comments
Assignees
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule
Milestone

Comments

@WilcoFiers
Copy link
Contributor

This generic evaluate method could look something like this:

const label = virtualNode.attr(options.attr);
return !!(label ? axe.commons.text.sanitize(label).trim() : '');

This will replace a number of non-empty-* evaluate methods.

@WilcoFiers WilcoFiers added this to the Axe-core 4.0 milestone Apr 28, 2020
@WilcoFiers WilcoFiers added feat New feature or enhancement rules Issue or false result from an axe-core rule labels May 4, 2020
@straker straker self-assigned this May 6, 2020
@padmavemulapati
Copy link

devTask

@jeankaplansky
Copy link
Contributor

no user-facing docs required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

4 participants