Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13730 closed defect (fixed)

xhtml tag names must be lowercase (in css)

Reported by: Inarus Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.1
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

I have noticed that a lot of css breaks becuase in the css for example in dijit/themes/dijit.css selectors like the following appears:

.dijitTextBox INPUT.dijitInputField

This of course should resemble the following to conform to xhtml standards:

.dijitTextBox input.dijitInputField

I only really test in firefox, and this breaks when using the xhtml mime type.

Attachments (1)

screenshot.png (17.0 KB) - added by Inarus 8 years ago.
Screenshot of bug showing an Editor, DateTextBox?, 2 TimeTextBoxes? and a FilteringSelect?

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by bill

It's easy to fix the CSS, although I wonder if that's enough to make XHTML work. A lot of the JS code has uppercase names, ex:

this.editWidget.focusNode.tagName == "INPUT"

and

var inputs = this.domNode.getElementsByTagName("INPUT")

and

dojo.query("INPUT[type=radio]", "radio-cells")
Last edited 8 years ago by bill (previous) (diff)

comment:2 Changed 8 years ago by bill

Cc: Douglas Hays added

Also, CC'ing Doug in case he knows a reason why we [often] use uppercase for tag names

Changed 8 years ago by Inarus

Attachment: screenshot.png added

Screenshot of bug showing an Editor, DateTextBox?, 2 TimeTextBoxes? and a FilteringSelect?

comment:3 Changed 8 years ago by Inarus

The screenshot uploaded above, you can see an extra down arrow on all the elements. This is the down arrow supplied by the value field on the input that should have been shifted out of view by the css. The css rules that do this however used the capitalised tag name so is not applied under xhtml.

Bill, I am right in thinking, that with the later two javascript examples given above, that getElementsByTagName and dojo.query would take care of the case?

comment:4 in reply to:  3 Changed 8 years ago by bill

Replying to Inarus:

The screenshot uploaded above, you can see an extra down arrow on all the elements. This is the down arrow supplied by the value field on the input that should have been shifted out of view by the css. The css rules that do this however used the capitalised tag name so is not applied under xhtml.

Oh, I believe you that XHTML mode isn't working, I just want to be sure not to break HTML mode, for example on IE6/quirks.

Bill, I am right in thinking, that with the later two javascript examples given above, that getElementsByTagName and dojo.query would take care of the case?

No idea, you should test that (on an XHTML page).

But note that in #4925 you claim that the parser can't find dojoType declarations... all it is doing is a node.getAttribute("dojoType"). If getAttribute() doesn't take care of case then I doubt that getElementsByTagName() does.

Last edited 8 years ago by bill (previous) (diff)

comment:5 Changed 8 years ago by Inarus

For firefox, both getElementsByTagName and getAttribute convert to lowercase, see the following, Though as far as I can tell, this isn't specified by the w3c for these functions. https://developer.mozilla.org/en/DOM/element.getElementsByTagName#Notes and https://developer.mozilla.org/en/DOM/element.getAttribute#Notes

This does confuse me though as to what *is* going on.

comment:6 Changed 8 years ago by bill

Component: GeneralDijit
Milestone: tbd1.7
Owner: set to bill
Status: newassigned

Hmm that is confusing, well I guess we can deal with that problem later if it pops up.

For now, I'll update the CSS for dijit. If you are having problems with dojo core or dojox projects please open separate tickets for them. I do see a number of dojox projects using capitals in their CSS files.

comment:7 Changed 8 years ago by bill

Resolution: fixed
Status: assignedclosed

In [26332]:

Use lowercase tag names to be friendly to XHTML, fixes #13730.

comment:8 Changed 8 years ago by bill

In [26333]:

Use lowercase tag names to be friendly to XHTML, refs #13730.

Note: See TracTickets for help on using tickets.