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

Split the non-empty-title fail message #2451

Closed
WilcoFiers opened this issue Aug 14, 2020 · 2 comments · Fixed by #2495
Closed

Split the non-empty-title fail message #2451

WilcoFiers opened this issue Aug 14, 2020 · 2 comments · Fixed by #2495
Assignees
Labels
good first issue For first-time contributors rule metadata Issues in the rule metadata code (lib/rules)

Comments

@WilcoFiers
Copy link
Contributor

The non-empty-title failure message describes two states in one message:

Element has no title attribute or the title attribute is empty

It would be better if there were two separate messages:

Element has no title attribute
The title attribute is empty

This can be done using this.data({ messageKey }) in the evaluate method, and converting the fail message to an object. See checks/language/has-lang.json for an example.

@padmavemulapati
Copy link

if title is not defined or empty title - seperate messages should display
<img id="target" title=" " />' `
image

@straker
Copy link
Contributor

straker commented Sep 24, 2020

No docs required

@straker straker closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue For first-time contributors rule metadata Issues in the rule metadata code (lib/rules)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants