Code

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12503 closed (fixed)

Form examples don't use w3c validating markup

Reported by: skyl Owned by: lukeplant
Component: Uncategorized Version: 1.1
Severity: Keywords: docs w3c
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Examples in the docs like:

http://docs.djangoproject.com/en/dev/topics/forms/#displaying-a-form-using-a-template

use method="POST" whereas w3c specifies method="post".

Attachments (0)

Change History (7)

comment:1 follow-ups: Changed 5 years ago by lukeplant

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Hmm, w3c docs says it is case insensitive: http://www.w3.org/TR/html4/interact/forms.html#adef-method

But the w3c validator does indeed complain at upper case.

comment:2 in reply to: ↑ 1 Changed 5 years ago by skyl

Replying to lukeplant:

Hmm, w3c docs says it is case insensitive: http://www.w3.org/TR/html4/interact/forms.html#adef-method

But the w3c validator does indeed complain at upper case.

My mistake if this is not legitimate. I suppose it is a bug in the validator rather than the django docs.

comment:3 in reply to: ↑ 1 ; follow-up: Changed 5 years ago by kmtracey

Replying to lukeplant:

Hmm, w3c docs says it is case insensitive: http://www.w3.org/TR/html4/interact/forms.html#adef-method

But the w3c validator does indeed complain at upper case.

It's doctype-dependent:

http://www.w3.org/TR/xhtml1/#h-4.2

Lower case is more broadly acceptable so should probably be used in the docs.

comment:4 in reply to: ↑ 3 Changed 5 years ago by lukeplant

  • Owner changed from nobody to lukeplant
  • Status changed from new to assigned

Replying to kmtracey:

It's doctype-dependent:

http://www.w3.org/TR/xhtml1/#h-4.2

That's about attribute names, not values. But:

Lower case is more broadly acceptable so should probably be used in the docs.

Agreed, I'll fix it.

comment:5 Changed 5 years ago by lukeplant

Fixed in [12086]. (Typo in that commit message closed the wrong bug)

comment:6 Changed 5 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [12087]) [1.1.X] Fixed #12503 - form examples don't validate according to w3c

Thanks to skyl for the report.

Backport of r12086 from trunk

comment:7 Changed 5 years ago by kmtracey

Replying to lukeplant:

Replying to kmtracey:

It's doctype-dependent:

http://www.w3.org/TR/xhtml1/#h-4.2

That's about attribute names, not values.

Hmm, so it is. And in a brief scan I can't find where it says anything similar for values. Validator a bit over-zealous maybe?

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.