Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
giacomo-petri opened this issue Mar 22, 2024 · 3 comments · Fixed by #2181
Closed

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

giacomo-petri opened this issue Mar 22, 2024 · 3 comments · Fixed by #2181
Assignees

Comments

@giacomo-petri
Copy link
Collaborator

giacomo-petri commented Mar 22, 2024

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.

@Jym77
Copy link
Collaborator

Jym77 commented Mar 23, 2024

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 🙈

@giacomo-petri
Copy link
Collaborator Author

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

@Jym77
Copy link
Collaborator

Jym77 commented Apr 11, 2024

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants