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

4.1.1 Validity vs. well-formedness #2186

Closed
detlevhfischer opened this issue Jan 18, 2022 · 5 comments
Closed

4.1.1 Validity vs. well-formedness #2186

detlevhfischer opened this issue Jan 18, 2022 · 5 comments

Comments

@detlevhfischer
Copy link
Contributor

detlevhfischer commented Jan 18, 2022

A while ago we had a longish exchange on Github (in German) between testers regarding the difference between syntax and validation errors. There was disagreement how to evaluate cases where the validator (after applying the Validate bookmarklet by @stevefaulkner to parsing results) still shows an error when code is well-formed but not valid. Two examples:

  • A. <span><h6>bla bla</h6></span> (correctly nested, but block-level element inside inline element)
  • B. <span href="../page.html">bla bla</span>. (html attribute used on inappropriate element)

A narrow definition of 4.1.1 wouls just look at well-formedness and disregard HTML validation requirements. It would thus accept both examples above.
Any views? I am hoping that @stevefaulkner may put this to rest...

@JAWS-test
Copy link

JAWS-test commented Jan 18, 2022

  • A: Is only a violation of 4.1.1, if with "elements are nested according to their specifications" is meant that not only <a><b></a></b> is a wrong nesting, but nesting must be done according to HTML specifications (no h6 inside of span). To my knowledge, there is no agreement on this in this forum (it has already been discussed). I think an agreement is very important!
  • B: Is not a violation, because wrong attributes (except duplicate attributes) are not mentioned in the 4.1.1. This is a bug in the parsing bookmarklet (which was only partially fixed by 4.1.1 Parsing - Exception for custom attributes other than data-*? #1078)

@JAWS-test
Copy link

JAWS-test commented Jan 18, 2022

I would be in favor of testing only with https://parsetree.validator.nu/ in the future. The tool seems to me best to check the syntax errors according to 4.1.1. According to this tool A and B are not an error.

Otherwise, one can only hope for progress on #770....

@bruce-usab
Copy link
Contributor

@detlevhfischer — How is A correctly nested? What part of B fails against the 4.1.1 text?

Do not get me wrong, it is a long standing concern that 4.1.1 requires neither validity nor well-formedness. The idea, as I recall, was to catch well-formedness errors which could be expected to cause difficult for assistive technology. The additional tension is that code which is caught by 4.1.1 still might not be problematic, and puts a11y auditors in a no-win situation. I think your A is an example there. The example I see pretty commonly is duplicate IDs, but none of the IDs are actually attached to content, and there is no effect on AT.

@detlevhfischer
Copy link
Contributor Author

detlevhfischer commented Jun 16, 2022

@bruce-usab With "correctly nested" I meant to express that opening and closing tags of the inner element are fully inside the outer element, as opposed to <span><h6>bla bla</span></h6>

We've had more discussions of this thorny issue on the BITV-Test GitHub (all in German) and I was asked whether we can fast-track this issue and #770

We will also evaluate whether using https://parsetree.validator.nu/ may solve some of the questions around evaluating content against 4.1.1.

@fstrr
Copy link
Contributor

fstrr commented May 10, 2024

This issue looks like it can be closed as it relates to 4.1.1. If it needs to be re-opened, please do that and convert it to a Discussion.

@fstrr fstrr closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants