Closed
Bug 158435
Opened 23 years ago
Closed 23 years ago
Page Info's label-control association is broken (should be by id).
Categories
(SeaMonkey :: Page Info, defect)
SeaMonkey
Page Info
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: nick, Assigned: nick)
Details
(Keywords: html4, testcase)
Attachments
(2 files, 3 obsolete files)
|
443 bytes,
text/html
|
Details | |
|
1.09 KB,
patch
|
nick
:
review+
nick
:
superreview+
jesup
:
approval+
|
Details | Diff | Splinter Review |
According to the HTML spec, the "for" attribute in a label specifies the *id* of
a form control, not the name
(http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1). Check how the
example in the spec uses both name and id attributes. But the code in
pageInfo.js associate it by the name attribute.
| Assignee | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Comment 2•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 3•23 years ago
|
||
Comment on attachment 92081 [details] [diff] [review]
patch
sr=bzbarsky
Attachment #92081 -
Flags: superreview+
| Assignee | ||
Comment 4•23 years ago
|
||
Attachment #92081 -
Attachment is obsolete: true
| Assignee | ||
Updated•23 years ago
|
Attachment #92082 -
Flags: superreview+
| Assignee | ||
Comment 5•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Attachment #92082 -
Attachment is obsolete: true
| Assignee | ||
Updated•23 years ago
|
Attachment #92083 -
Flags: superreview+
Comment 6•23 years ago
|
||
Comment on attachment 92083 [details] [diff] [review]
Ops, attached the old file instea of the new one =/
You are correct that the label really should match the id, and not the name.
However, because mozilla also associates the for attribute with the names, this
should also match with the names. The absolute easiest way to make this change
is to add "|| formfields[j].id == whatfor" to the test inside the inner loop.
I'd rather you didn't use .form anywhere, it has bugs, though I don't remeber
the bug numbers right off. A couple of the comments in the code mention it
though. I think .getAttribute("form") works correctly though, if you really
need to do that.
| Assignee | ||
Comment 7•23 years ago
|
||
>You are correct that the label really should match the id, and not the name.
>However, because mozilla also associates the for attribute with the names.
Where? If it does so, it's broken there.
>I'd rather you didn't use .form anywhere, it has bugs, though I don't remeber
>the bug numbers right off. A couple of the comments in the code mention it
>though. I think .getAttribute("form") works correctly though, if you really
>need to do that.
Uhm... control.form is very widely used in pages, it gets the form object from a
control. Being so idely used... why would be the bug that prevents its use here?
Anyway it's an optimization, and it coud be removed...
| Assignee | ||
Comment 8•23 years ago
|
||
AFAICS if I open the testcase and click on "Good label", the appropiate control
get focused. If I click on "Bad label" it doesn't. It seems that Mozilla is
getting right the label-form association and doesn't use name at all.
Comment 9•23 years ago
|
||
which test case?
| Assignee | ||
Comment 10•23 years ago
|
||
er... the one attached to this bug, aptly named "testcase" =)
Comment 11•23 years ago
|
||
oh, that one. hrm, what does it do when you delete the doctype (putting it into
quirks mode?) (I don't have Mozilla on this computer here at work)
| Assignee | ||
Comment 12•23 years ago
|
||
I've tried with the page in quirks mode, same thing. Mozilla links the label to
the form only by the id attribute, ignoring the link by "name".
Comment 13•23 years ago
|
||
Comment on attachment 92083 [details] [diff] [review]
Ops, attached the old file instea of the new one =/
r=ksosez
Attachment #92083 -
Flags: review+
Comment 14•23 years ago
|
||
Comment on attachment 92083 [details] [diff] [review]
Ops, attached the old file instea of the new one =/
Prevailing style clearly puts a space after if, for, and other keywords.
Please follow it.
/be
| Assignee | ||
Comment 15•23 years ago
|
||
Attachment #92083 -
Attachment is obsolete: true
| Assignee | ||
Updated•23 years ago
|
Attachment #92120 -
Flags: superreview+
Attachment #92120 -
Flags: review+
| Assignee | ||
Updated•23 years ago
|
Comment 16•23 years ago
|
||
Comment on attachment 92120 [details] [diff] [review]
Some spaces added
Approval granted for trunk checkin. Please request branch checkin once this is
verified on trunk with no regressions.
Attachment #92120 -
Flags: approval+
Comment 17•23 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 18•23 years ago
|
||
Approval for branch checkin; please change mozilla1.0.1+ to fixed1.0.1 when
checked in.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Keywords: verified1.0.1
Comment 20•23 years ago
|
||
Verified on windows 2k, (netscape branch build: 2002-08-21-08-1.0)
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•