AssertContentTrait::AssertOption test not HTML 5 compliant, nor is XPath in general

Created on 21 March 2015, over 9 years ago
Updated 10 March 2024, 6 months ago

Problem/Motivation

Ran across this while working on the Attribute system code - I wrote the code to output Boolean attributes in accordance to HTML5 standards. However the testing system uses XPath for validation, and Boolean attributes are one area where XHTML and HTML have never matched. I set the code to output this:

<option selected value="some value">Label</option>

But Xpath, as an XHTML validator, is looking for

<option selected="selected" value="some value">Label</option>

When I adjusted my code it passed all tests, and this close to 8.0 roll out its not remotely worth it to resolve this or any other XHTML vs. HTML validation issue - but long term if the codebase is to output valid HTML (not XHTML) code a parser other than XPath will have to be chosen.

Marked as 8.0.x dev since that's where the bug was observed, but realistically 8.1.x is the earliest it can be fixed.

Attached is the prior patch from template assertions which is outputting valid HTML 5 code in the manner that the tester fails because it isn't valid XHTML

Steps to reproduce

Proposed resolution

TBA

Remaining tasks

Search for an existing Meta issue and if one does not exist, create one.
Make this a child of the meta
Address #19.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated 4 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States Aki Tendo

Live updates comments and jobs are added and updated live.
  • html5

    Implements and supports the use of HTML5.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024