[wp-trac] [WordPress Trac] #34881: Invalid HTML around the input field for searching themes
WordPress Trac
noreply at wordpress.org
Mon Dec 7 17:08:57 UTC 2015
#34881: Invalid HTML around the input field for searching themes
----------------------------+--------------------------------------------
Reporter: takayukister | Owner: adamsilverstein
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 4.3
Severity: normal | Resolution:
Keywords: good-first-bug | Focuses: ui, accessibility, javascript
----------------------------+--------------------------------------------
Comment (by iamjolly):
Technically, this is OK. Having input elements outside of form elements
should pass W3C validation.
However, I understand the concern. Potentially, having the label, input,
and submit elements outside of a containing form element, in essence, goes
against the "Robust" principle of web accessibility. Specifically, the
guideline pertaining to this issue is a Level A guideline. Emphasis is
mine:
4.1.1 Parsing: In content implemented using markup languages, elements
have complete start and end tags, '''''elements are nested according to
their specifications''''', elements do not contain duplicate attributes,
and any IDs are unique, except where the specifications allow these
features. (Level A)
The main concern is this: when HTML elements are not used in the
recommended way, user agents may render them in unexpected ways. It can
also become a problem for compatibility with older or even future
browsers, devices, or other software.
Here are links to this guideline for 4.1.1:
http://www.w3.org/TR/WCAG20/#robust and the W3C's recommendation for
forms: http://www.w3.org/TR/html5/forms.html#forms
Since this doesn't exactly map to a true validation issue, it can be left
as-is. However, I'd recommend enhancing these inputs to have a form
wrapper for compatability when, say, JavaScript issues occur or a user has
their JS disabled. That way, you can explicitly give an address for the
input to submit to.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34881#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list