-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Incorrect error message selected for parent element restriction #25499
Copy link
Copy link
Closed
Labels
P3: When PossibleType: BugValidator: Type: Error MessagesIssue with the quality of the error messages that the validator producesIssue with the quality of the error messages that the validator producesWG: caching
Description
As a follow up to #25339 (comment),
In this example:
<!-- Invalid: submenus cannot be inside an amp-accordion -->
| <amp-accordion>
| <section>
| <h4>accordion header</h4>
| <div>
| <h4 amp-nested-submenu-open></h4>
| <div amp-nested-submenu></div>
>> ^~~~~~~~~
amp-nested-menu/0.1/test/validator-amp-nested-menu-error.html:59:12 The attribute 'amp-nested-submenu' may not appear in tag 'div'.
The real error is that divs containing the amp-nested-submenu attribute should not be a child of accordion, not that "The attribute 'amp-nested-submenu' may not appear in tag 'div'." The error message is misleading, since the amp-nested-submenu attribute is actually supposed to be used with a div.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3: When PossibleType: BugValidator: Type: Error MessagesIssue with the quality of the error messages that the validator producesIssue with the quality of the error messages that the validator producesWG: caching