Closed Bug 230616 Opened 21 years ago Closed 21 years ago

<noscript> should be inline when displayed

Categories

(Core :: Layout, defect)

x86
Other
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bamm, Assigned: bzbarsky)

References

Details

(Keywords: qawanted)

Attachments

(1 file)

When JavaScript is turned off, the text inside the <noscript> tags are displayed as block instead of inline. Here is a test case: <script type="text/javascript"> var name="Bamm Gabriana"; </script> Hello <script type="text/javascript"> document.write(name); </script> <noscript>New Visitor</noscript> and welcome to our homepage! In this test case, "New Visitor" should be inline with the text just as the "Bamm Gabriana" had been. Here are the reasons why I believe the current behavior is incorrect: 1) The output of <script> is inline. Since <noscript> is intended to show alternate text for users who do not (or cannot) use JavaScript, it should be in the same place as the script's output. 2) Netscape 4.8, Internet Explorer, Opera and Konqueror all display the noscript text inline. 3) Non-JavaScript browsers such as Lynx simply ignore the <noscript> tag and display the text inline. Desired behavior would emulate non-recognition of the noscript tag.
See bug 52744 and bug 77296 That said, I think it would make sense to use display:inline for compat reasons. dbaron, hixie, what do you think?
Assignee: general → nobody
Component: Browser-General → Layout: Misc Code
Keywords: qawanted
QA Contact: general → core.layout.misc-code
That has to do with how it's parsed, not necessarily with how it's laid out...
Re comment 1, that seems pretty reasonable, since <noscript> is supposed to contain a block-level element anyway, so making it inline shouldn't break anything that's written to the spec.
It looks like Mats Palmgren is right. This bug may be invalid. Personally though, this is one case where I believe the de jure standard may not be desirable. It breaks a large body of existing code and is inconsistent with what noscript is designed for, as alternate text. It is like having the ALT attribute of an image made block, even if an image is inline. It looks like a choice between compatibility with the written spec and compatibility with existing pages. Furthermore, I don't think it is a practical solution to ask all webmasters to add the code <noscript><style>noscript{display:inline}</style></noscript> to their pages. Most simply won't and will leave it to the readers to bear with it. We should ensure that pages look as intended for end-users who choose to turn off scripts for whatever their reasons may be (low-end computers?). Perhaps we should even work to have the existing standard changed.
I agree, we should be compatible with existing pages. /be
Attached patch So like thisSplinter Review
Attachment #139083 - Flags: superreview?(dbaron)
Attachment #139083 - Flags: review?(dbaron)
Attachment #139083 - Flags: superreview?(dbaron)
Attachment #139083 - Flags: superreview+
Attachment #139083 - Flags: review?(dbaron)
Attachment #139083 - Flags: review+
Assignee: nobody → bz-vacation
Checked in last night.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 52744 has been marked as a duplicate of this bug. ***
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: