Closed tombui99 closed 5 months ago
Cc: @adamcogan @william-liebenberg @tiagov8
Implement the new rule
Done - I have added a new custom rule to CodeAuditor that checks for website without favicon.
CodeAuditor scans for any website without rel="icon
Figure: New custom rule on CodeAuditor page https://codeauditor.com/rules
Figure: Custom rule logic
Figure: All custom rules unit tests which have all passed
Hi @tombui99
One question:
rel="icon
should be inside the <head>
?Before you close this Issue, we need some testing:
cc @william-liebenberg @adamcogan
Hi @tiagov8
From my testing, it is not technically possible to implement this custom rule due to how the HTML engine works.
The engine checks each HTML element individually and reports if it finds a problem within that element. For example, within a head
, there might be multiple link
tags without the text icon
, and the engine will report all of these tags, even if there's one correct tag with icon.
Therefore, I'm disabling the custom rule and closing this issue.
Let me know if there's anything.
Fix custom rule so it checks for
rel=icon
is used at least once in thehead
Done - As approved by @william-liebenberg , we have implemented the custom rule with the workaround.
Also, as per my Teams conversation with @tiagov8 , I have also ran a test scan on https://kontofurniture.ca/collections/office-chairs and CodeAuditor was able to catch the error.
See https://codeauditor.com/htmlhint/9def4cbb-38ad-460b-9602-cc2b0a33d8fd
Cc: @adamcogan @william-liebenberg @tiagov8
Pain
As per my conversation with @tiagov8 , we need to add a new custom rule that checks if a website has favicon.
See SSW Rule https://www.ssw.com.au/rules/favicon/
Tasks
Thanks!