{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/html/issues/355","repository_url":"https://api.github.com/repos/w3c/html","labels_url":"https://api.github.com/repos/w3c/html/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/w3c/html/issues/355/comments","events_url":"https://api.github.com/repos/w3c/html/issues/355/events","html_url":"https://github.com/w3c/html/issues/355","id":153628286,"number":355,"title":"allow div to accept more kinds of content or add a new element","user":{"login":"Nick-Levinson","id":10383950,"avatar_url":"https://avatars.githubusercontent.com/u/10383950?v=3","gravatar_id":"","url":"https://api.github.com/users/Nick-Levinson","html_url":"https://github.com/Nick-Levinson","followers_url":"https://api.github.com/users/Nick-Levinson/followers","following_url":"https://api.github.com/users/Nick-Levinson/following{/other_user}","gists_url":"https://api.github.com/users/Nick-Levinson/gists{/gist_id}","starred_url":"https://api.github.com/users/Nick-Levinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nick-Levinson/subscriptions","organizations_url":"https://api.github.com/users/Nick-Levinson/orgs","repos_url":"https://api.github.com/users/Nick-Levinson/repos","events_url":"https://api.github.com/users/Nick-Levinson/events{/privacy}","received_events_url":"https://api.github.com/users/Nick-Levinson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/html/labels/Incubate%20this%20first","name":"Incubate this first","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-08T01:07:45Z","updated_at":"2016-05-21T02:45:11Z","closed_at":null,"body":"It helps in organizing a page and applying CSS to have an element that can be used for dividing the source code in the page. The issue with HTML 5.1 is that what elements are included within such a division should not matter. Comments can be used but that won't allow minimization (diagnosis often depends on examining the source code received over the Internet, not preproduction files).\r\n\r\nI use the div element but was recently reminded by a validator (https://validator.w3.org/nu/) not to use it for nonflow content. That probably also excludes use for nonflow descendants that are not children. The issue was with a div element that was only for a script. That div is within another div, defining a column. The divs have CSS. I'd rather not take the script out of a div if doing so will take it out of the website's look produced by CSS.\r\n\r\nIn HTML 5.1, either the div element should be redefined to allow use for any kind of content or a new all-content-type element should be defined so as to be consistent with the purpose of organizing source code within the body element. As it is, HTML 5.1 in section 3.2.4 permits other specs to require an element be used elsewhere than allowed by HTML 5.1, which means non-HTML use is not barred but probably depends on browser designers having a reason to recognize it. At the least, if some content types would be a problem for a div, either those types should be explicitly enumerated or more types should be explicitly allowed.\r\n\r\nI originally posted essentially this at https://www.w3.org/Bugs/Public/show_bug.cgi?id=29537 where it was set to WONTFIX, but without a reason or question and with an invitation to reopen here."},"comment":{"url":"https://api.github.com/repos/w3c/html/issues/comments/220754451","html_url":"https://github.com/w3c/html/issues/355#issuecomment-220754451","issue_url":"https://api.github.com/repos/w3c/html/issues/355","id":220754451,"user":{"login":"Nick-Levinson","id":10383950,"avatar_url":"https://avatars.githubusercontent.com/u/10383950?v=3","gravatar_id":"","url":"https://api.github.com/users/Nick-Levinson","html_url":"https://github.com/Nick-Levinson","followers_url":"https://api.github.com/users/Nick-Levinson/followers","following_url":"https://api.github.com/users/Nick-Levinson/following{/other_user}","gists_url":"https://api.github.com/users/Nick-Levinson/gists{/gist_id}","starred_url":"https://api.github.com/users/Nick-Levinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nick-Levinson/subscriptions","organizations_url":"https://api.github.com/users/Nick-Levinson/orgs","repos_url":"https://api.github.com/users/Nick-Levinson/repos","events_url":"https://api.github.com/users/Nick-Levinson/events{/privacy}","received_events_url":"https://api.github.com/users/Nick-Levinson/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T02:45:11Z","updated_at":"2016-05-21T02:45:11Z","body":"The page renders properly, including the search box; I could delete most of my div elements without affecting page rendering, as only a few are needed for intended rendering. This issue is about clarity in source code organization, useful for finding code and diagnosing problems.\r\n\r\nValidation is not perfect in either direction. Some browsers don't render HTML5 fully and properly and validation won't predict those problems. And sometimes nonstandard coding that fails validation is necessary, such as br elements in some li list items because in certain layouts I get peculiar harder-to-read results if I don't have br elements, but the br elements in that context fail validation. However, in general, validation predicts proper rendering.\r\n\r\nIt would be odd to ask W3C to change their validator to ignore a criterion in W3C's HTML, in this case that a div element is only for certain kinds of content. It's probably not a good idea to change the validator that way and W3C probably won't agree. It might be feasible to reprogram the validator to let users select criteria to apply, much as a word processor's grammar checker may let a user choose which syntactical criteria to apply. That kind of reprogramming would be a lot of work, but if it's done then one could make an exception for div elements for content type. Selectivity for many or most criteria would be useful, but to exclude just one criterion, even with a legend saying so, would not be useful.\r\n\r\nGoogle's HTML5 code need not have passed validation to be recommended or prescribed by Google. It only had to cause the search functions to work.\r\n\r\nI'm not clear how a div element can replace its content, when the content is present."}}
{"actor":{"display_login":"Nick-Levinson"}}