{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546","labels_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546/labels{/name}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546/comments","events_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546/events","html_url":"https://github.com/jquery/jquery-ui/pull/1546","id":71188671,"number":1546,"title":"Add methods for finding labels and forms for controls","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jquery/jquery-ui/labels/CLA:%20Valid","name":"CLA: Valid","color":"007700"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jquery/jquery-ui/milestones/1","html_url":"https://github.com/jquery/jquery-ui/milestones/1.12","labels_url":"https://api.github.com/repos/jquery/jquery-ui/milestones/1/labels","id":743651,"number":1,"title":"1.12","description":"","creator":{"login":"scottgonzalez","id":141167,"avatar_url":"https://avatars.githubusercontent.com/u/141167?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgonzalez","html_url":"https://github.com/scottgonzalez","followers_url":"https://api.github.com/users/scottgonzalez/followers","following_url":"https://api.github.com/users/scottgonzalez/following{/other_user}","gists_url":"https://api.github.com/users/scottgonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgonzalez/subscriptions","organizations_url":"https://api.github.com/users/scottgonzalez/orgs","repos_url":"https://api.github.com/users/scottgonzalez/repos","events_url":"https://api.github.com/users/scottgonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/scottgonzalez/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2014-08-05T14:44:19Z","updated_at":"2015-04-27T06:09:27Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-04-27T06:09:07Z","updated_at":"2015-04-29T05:26:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546","html_url":"https://github.com/jquery/jquery-ui/pull/1546","diff_url":"https://github.com/jquery/jquery-ui/pull/1546.diff","patch_url":"https://github.com/jquery/jquery-ui/pull/1546.patch"},"body":"This adds 2 new `$.fn` methods to core, and a new prop to `$.ui.escapeId`.\r\n\r\n`$.fn.labels` which mimics the native `control.labels` ( and uses it where possible ). This method unlike the native property also works on detached DOM nodes, and in browsers not supporting `control.labels`. \r\n\r\n`$.fn.form` which fixes the native `control.form` in IE8 where setting the `form` attribute breaks the `form` property by changing it to a string. \r\n\r\n`$.ui.escapeId` is a regex for escaping `id` and similar to be able to use them as jQuery selectors. Its needed anytime you are building a selector from the id or some other attribute of an element because there are characters valid in the HTML that need to be escaped when used as a selector. \r\n\r\nThis also updates selectmenu to use both `$.fn.labels` and `$.ui.escapeId` and it updates tabs to use `$.ui.escapeId`. `$.fn.form` is needed both by checkboxradio in the button rewrite but also by the from reset extension @scottgonzalez is working on. Checkboxradio will also use `$.ui.escapeId`. jquery-mobile will also use all three of these.\r\n\r\nNote: This does add 3 new exceptions to `htmllint:bad` for the labels tests. These are needed to make sure we match that native implementation. While the markup may not be valid it is supported by every browser, so it is required otherwise we could get label / input mismatches which would break visual state and underlying state consistency for inputs and labels in things like checkboxradio. Specifically this can happen with inputs wrapped in multiple labels, and inputs which are wrapped in a label which is associated with an input besides the one it contains based on its `for` attribute."},"comment":{"url":"https://api.github.com/repos/jquery/jquery-ui/issues/comments/97310813","html_url":"https://github.com/jquery/jquery-ui/pull/1546#issuecomment-97310813","issue_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546","id":97310813,"user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T05:26:15Z","updated_at":"2015-04-29T05:26:15Z","body":"@scottgonzalez updated"}}