Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use <fieldset> in Comment Form #26

Open
splorp opened this issue Dec 11, 2011 · 2 comments
Open

Use <fieldset> in Comment Form #26

splorp opened this issue Dec 11, 2011 · 2 comments
Labels

Comments

@splorp
Copy link
Owner

splorp commented Dec 11, 2011

The existing <p> elements wrapping form <input> and <label> pairs should be changed to use <fieldset> elements.

@cdharrison
Copy link
Collaborator

Wouldn't a <fieldset> typically have a group of <input> and <label> tags? Not sure if

<legend><label for="author">Name <?php if ($req) echo "(required)"; ?></label></legend>
<input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
</fieldset>```
would be proper... [This] (http://stackoverflow.com/questions/238996/wrapping-a-label-element-within-a-legend-element) argues it would be incorrect usage.

@splorp
Copy link
Owner Author

splorp commented Dec 23, 2011

You’re right.

Looking at this again, my idea doesn’t make any semantic sense. I was trying to get away from adding more <div> or <span> noise in there, as paragraphs aren’t semantically correct either. At least using <div> or <span> is neutral.

Let me review some of Luke Wroblewski’s best practices and revisit this.

If nothing else, the groups of fields within the comment form should be wrapped in a <fieldset> with its own descriptive <legend>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants