Closed Bug 679464 Opened 10 years ago Closed 10 years ago

Firefox 5.01 always renders html5 attributes regardless of doctype declaration

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: amerigohosting, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
Build ID: 20110707182747

Steps to reproduce:

We have been using the tag "required='true'" on our tags for a long time, this has not been an issue since we have always been in xhtml strict mode.

We did this by using one of the following doctypes.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict //EN" "http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

And having a form like the following
<form>
<input type="text" required="true">
<input type="submit">
</form>

Our actual form is very very large, and has a javascript workflow powered by radio buttons.   Because of this several of the values will be empty on a submit.



Actual results:

On submit, the page says that you should enter values into the field (though it renders this box outside of the browser, either behind the top left tab, or under the browser window itself.


Expected results:

It should never have evaluated the html5 attribute "required"
Unless your serving the page as mimetype application/xhtml+xml your actually serving (broken) html, and that means the html5 parser will parse the document according to that.

Doctype doesn't matter for xhtml if the mimetype is wrong (according to specs). [1]

The html has a reserved namespace you should use for invented attributes and that's the data- prefix. It's both historically and future safe. [2]

[1] http://lists.w3.org/Archives/Public/www-html/2000Sep/0024.html
[2] http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data-with-the-data-attributes
In other words:
A HTML5 browser makes no difference between any doctypes which trigger standards mode

-> INVALID
Component: General → DOM: Core & HTML
Depends on: 596511
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: general → general
Hardware: x86 → All
Version: 5 Branch → Trunk
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Actually, it wouldn't matter if the content were served as application/xhtml+xml, since the HTML5 spec redefines that type too.

But yes, this is the behavior the HTML5 spec requires.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.