act-rules / act-rules.github.io

Accessibility conformance testing rules for HTML
https://act-rules.github.io/
Other
131 stars 67 forks source link

Passed Example 2 of "HTML page has non-empty title" rule is quite ambiguous #2169

Open giacomo-petri opened 3 months ago

giacomo-petri commented 3 months ago

In HTML page has non-empty title the Passed Example 2 says:

This page has a title element that serves as the title for the page and the iframe since the iframe does not have its own.

<html>
    <title>This page gives a title to an iframe</title>
    <iframe src="/test-assets/sc2-4-2-title-page-without-title.html"></iframe>
</html>

While the rule's applicability and intention pertain solely to the current page, the wording of this example may suggest - albeit ambiguously - that the of the page serves as a title for the iframe as well.</p> <p>Given that "title" is also the attribute used to set an accessible name for iframe elements, we should be careful in using this terminology to prevent any potential confusion or conflict with the <a rel="noreferrer nofollow" target="_blank" href="https://www.w3.org/WAI/standards-guidelines/act/rules/cae760/proposed/">Iframe element has a non-empty accessible name</a> rule. </p> <p>Therefore, it would be prudent to consider rephrasing to eliminate any ambiguity. If you agree with the above, I can open a PR.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/Jym77"><img src="https://avatars.githubusercontent.com/u/19969498?v=4" />Jym77</a> commented <strong> 3 months ago</strong> </div> <div class="markdown-body"> <p>Yes, the example is here to show that the rule does not care about nested documents, only the top-level ones. OTOH, since it is not a <code>srcdoc</code>, it seems that the nested document breaks the <a href="https://html.spec.whatwg.org/multipage/semantics.html#the-head-element">content model for <code>head</code></a> 🙈</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/giacomo-petri"><img src="https://avatars.githubusercontent.com/u/106394951?v=4" />giacomo-petri</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>I hadn't noticed that the iframe was nested within a head tag...</p> <p>@Jym77, if you're fine with it, I'll relocate the iframe element to the body and adjust the rule description (along with the page title).</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/Jym77"><img src="https://avatars.githubusercontent.com/u/19969498?v=4" />Jym77</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>Sounds good.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>