You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the AMP WordPress plugin we want to add more linkages between the internal validation tool and amp.dev. If someone is using a component in a way that violates its validator spec, then we'd want to link the user to the docs page for that component. However, the required spec_url is not supplied for all tag specs.
For example, let's say I put an <amp-accordion> on my page and inside of it I put a <section> which contains one single <h2>. This would violate the spec. But which spec? Specifically it would be the spec with the name amp-accordion > section, and and we'd want to link the user to https://amp.dev/documentation/components/amp-accordion/
However, there is no spec_url defined for this tag spec:
When that tag spec is violated, a “Learn More” link is provided:
So why is https://amp.dev/documentation/components/amp-accordion not supplied as the spec_url for the amp-accordion > section tag spec as it is done for the amp-accordion tag spec? If the spec_url were supplied for every tag spec this would facilitate providing developers with important context for why it is invalid and where they can find proper usage information.
Can all of the tag specs be updated to supply the relevant spec_url for each?
The text was updated successfully, but these errors were encountered:
@westonruter we in the wg:caching team welcome PRs that improve the developer experience. It looks like you're working on one and we would appreciate anything that improves the developer experience.
This bug is stated as more of a question than a specific feature request. I'm not sure when we would consider it closed as a feature request. Since the question is answered, closing this.
In the AMP WordPress plugin we want to add more linkages between the internal validation tool and amp.dev. If someone is using a component in a way that violates its validator spec, then we'd want to link the user to the docs page for that component. However, the required
spec_url
is not supplied for all tag specs.For example, let's say I put an
<amp-accordion>
on my page and inside of it I put a<section>
which contains one single<h2>
. This would violate the spec. But which spec? Specifically it would be the spec with the nameamp-accordion > section
, and and we'd want to link the user to https://amp.dev/documentation/components/amp-accordion/However, there is no
spec_url
defined for this tag spec:amphtml/extensions/amp-accordion/validator-amp-accordion.protoascii
Lines 67 to 74 in 2dd8c32
And so the Validator is not able to provide a “Learn More” link:
The spec name for
amp-accordion
does have aspec_url
defined, however:amphtml/extensions/amp-accordion/validator-amp-accordion.protoascii
Lines 43 to 62 in 2dd8c32
When that tag spec is violated, a “Learn More” link is provided:
So why is https://amp.dev/documentation/components/amp-accordion not supplied as the
spec_url
for theamp-accordion > section
tag spec as it is done for theamp-accordion
tag spec? If thespec_url
were supplied for every tag spec this would facilitate providing developers with important context for why it is invalid and where they can find proper usage information.Can all of the tag specs be updated to supply the relevant
spec_url
for each?The text was updated successfully, but these errors were encountered: