W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2016

[Bug 29877] New: Suggestion - add an option to hide custom tags and attributes

From: <bugzilla@jessica.w3.org>
Date: Wed, 28 Sep 2016 16:40:28 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-29877-169@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29877

            Bug ID: 29877
           Summary: Suggestion - add an option to hide custom tags and
                    attributes
           Product: Validator
           Version: HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: check
          Assignee: dave.null@w3.org
          Reporter: stefan@sollinger.name
        QA Contact: www-validator-cvs@w3.org
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 28 September 2016 16:40:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 28 September 2016 16:40:39 UTC