This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21971 - Paragraph elements in fieldset example are semantically incorrect.
Summary: Paragraph elements in fieldset example are semantically incorrect.
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 normal
Target Milestone: ---
Assignee: Robin Berjon
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: CR
Depends on:
Blocks:
 
Reported: 2013-05-08 17:59 UTC by xaxiobrandish
Modified: 2014-01-16 15:10 UTC (History)
6 users (show)

See Also:


Attachments

Description xaxiobrandish 2013-05-08 17:59:18 UTC
The paragraph elements located in the examples at the following location are semantically incorrect:

http://www.w3.org/TR/html5/forms.html#dom-fieldset-elements

As per posts on the mailing list, they serve to separate content rather than grouping it.

http://lists.w3.org/Archives/Public/public-html-comments/2013May/0012.html
http://lists.w3.org/Archives/Public/public-html-comments/2013May/0017.html

Specifically, in the three examples at the end of the section, all paragraph elements can be removed and still achieve the same semantic effect.  All of the elements in the forms are related, and separated by labels.
Comment 1 Peter Occil 2013-05-08 20:55:54 UTC
The issue I see with that is that "label" is usually rendered as an inline element by default, rather than as a block element.

Accordingly, if the "p" elements are to be removed then I think
the specification should do one of these three things.

* Replace the "p" elements with another -- perhaps more appropriate --
block-level element, such as "div", or if that's not acceptable,
* Include a CSS "style='display:block'", but I don't think that's ideal
because none of the other examples in Section 4.10 include a style
attribute; or if that's not acceptable,
* Add a note next to the examples that under CSS, label elements
are rendered as inline elements rather than as block elements by
default.
Comment 2 xaxiobrandish 2013-05-10 00:32:08 UTC
The first option you mention is the most acceptable, I believe.

In the first proposition, the "fieldset" element already groups the related field controls, as does the "label" element, so no more semantic meaning is necessary.  AS such, a "div" would be more appropriate since it adds no meaning to the content.  Because this is a rendering(presentation) issue as you state, it seems like the best option.
Comment 3 xaxiobrandish 2013-05-10 00:33:38 UTC
(In reply to comment #2)
> The first option you mention is the most acceptable, I believe.
> 
> In the first proposition, the "fieldset" element already groups the related
> field controls, as does the "label" element, so no more semantic meaning is
> necessary.  AS such, a "div" would be more appropriate since it adds no
> meaning to the content.  Because this is a rendering(presentation) issue as
> you state, it seems like the best option.

*AS was not meant to be caps-locked.  Apologies.
Comment 4 Travis Leithead [MSFT] 2013-07-22 23:03:17 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:


   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: Applied div for p + note.

Fixed in 5.1: https://github.com/w3c/html/commit/72d8faaa484bc35c3b4d208ef4a1c0b1c9b5c767

And in the latest CR editors draft:
https://github.com/w3c/html/commit/05d1f3f4f7002c0e12ce719c4acef39abfb5a85d
Comment 5 github bugzilla bot 2014-01-16 14:50:46 UTC
Commit pushed to merge-CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/0f25f5a31acf5644bc9ce02781cff07644722fb7
Cherry-pick [Bug 21971]

Pulling:
https://github.com/w3c/html/commit/72d8faaa484bc35c3b4d208ef4a1c0b1c9b5c767
into the CR branch
(cherry picked from commit 05d1f3f4f7002c0e12ce719c4acef39abfb5a85d)
Comment 6 github bugzilla bot 2014-01-16 15:10:19 UTC
Commits pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/72d8faaa484bc35c3b4d208ef4a1c0b1c9b5c767
[Bug 21971] Paragraph elements in fieldset example are semantically incorrect

https://github.com/w3c/html/commit/0f25f5a31acf5644bc9ce02781cff07644722fb7
Cherry-pick [Bug 21971]