[wp-trac] [WordPress Trac] #36735: Add media, insert from URL and alt attribute
WordPress Trac
noreply at wordpress.org
Sat Jul 16 14:49:28 UTC 2016
#36735: Add media, insert from URL and alt attribute
------------------------------------------------+--------------------------
Reporter: afercia | Owner: joemcgill
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.6
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback 2nd-opinion | Focuses:
| accessibility
------------------------------------------------+--------------------------
Comment (by joemcgill):
Replying to [comment:21 adamsilverstein]:
> @joemcgill thanks for the quick fix here, I was looking at this ticket
today with @afineman and wondering if in `wp.html.string` we should be
inserting as the comment calls it 'empty attribute notation' for any
attribute?
This is a good question. Looking back through the history here, it seems
like the current behavior was introduced in [22567], but it's not clear
why @koop added this "empty attribute notation" check. Looking at the W3C
draft spec, the only valid use case for that style that I could come up
with is this section on [boolean
attributes](http://w3c.github.io/html/infrastructure.html#sec-boolean-
attributes). Ex:
{{{
<label><input type=checkbox checked name=cheese disabled> Cheese</label>
}}}
However, even for those cases I can't see how something like
`prop.checkbox = ''` would be expected to be true, so
[attachment:36735.4.patch] seems like the right approach here. All of our
QUnit tests still pass with [attachment:36735.4.patch], but I'm not sure
we have adequate (or any) coverage for something that would break by
changing that check.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36735#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list