This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29877 - Suggestion - add an option to hide custom tags and attributes
Summary: Suggestion - add an option to hide custom tags and attributes
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-28 16:40 UTC by Stefan
Modified: 2016-09-28 16:40 UTC (History)
0 users

See Also:


Attachments

Description Stefan 2016-09-28 16:40:28 UTC
Suggestion:
Add an option to the validator to hide errors caused by custom tags (and also custom attributes).

Use case:
Pages created in Angular typically show lots of errors caused by custom tags used for Angular directives (like <my-directive>...</my-directive>) and custom attributes (like ng-click="..." etc.)
(Note, on Angular pages I copy & paste generated code into the validator)

I'm aware that it is possible to write Angular code in such a way that there are no parsing errors (e.g. <my-directive> could be replaced by <div data-my-directive>) but unfortunately this is usually not the case.

Currently, when the validator comes across a custom tag I get an error similar to this:
"Element my-directive not allowed as child of element body in this context. (Suppressing further errors from this subtree.)"

The biggest issue for me is that the sub tree is not validated.
I have pages where a custom tag is used for the main content of the page, so effectively nothing on the page is validated.

I want to be able to ignore the errors caused by Angular (custom tags and attributes) and see structural problems (incorrect nesting, duplicated id's etc). Currently that's not possible if errors are in a sub tree that's ignored.
To address this, I think the easiest solution would be an option to hide custom tags and attributes. 

Note, the existing "message filtering" cannot be used in this scenario, because the sub tree of a custom tag would still be ignored, and therefore large parts of the page may be excluded from the validation.