act-rules/act-rules.github.io

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

giacomo-petri opened this issue · 3 comments

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 <title> of the page serves as a title for the iframe as well.

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 Iframe element has a non-empty accessible name rule.

Therefore, it would be prudent to consider rephrasing to eliminate any ambiguity.
If you agree with the above, I can open a PR.

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 srcdoc, it seems that the nested document breaks the content model for head 🙈

I hadn't noticed that the iframe was nested within a head tag...

@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).

Sounds good.