{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/aria/issues/777","repository_url":"https://api.github.com/repos/w3c/aria","labels_url":"https://api.github.com/repos/w3c/aria/issues/777/labels{/name}","comments_url":"https://api.github.com/repos/w3c/aria/issues/777/comments","events_url":"https://api.github.com/repos/w3c/aria/issues/777/events","html_url":"https://github.com/w3c/aria/issues/777","id":327791912,"node_id":"MDU6SXNzdWUzMjc3OTE5MTI=","number":777,"title":"Need clarity on missing/invalid ARIA attribute values","user":{"login":"minorninth","id":5933702,"node_id":"MDQ6VXNlcjU5MzM3MDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5933702?v=4","gravatar_id":"","url":"https://api.github.com/users/minorninth","html_url":"https://github.com/minorninth","followers_url":"https://api.github.com/users/minorninth/followers","following_url":"https://api.github.com/users/minorninth/following{/other_user}","gists_url":"https://api.github.com/users/minorninth/gists{/gist_id}","starred_url":"https://api.github.com/users/minorninth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minorninth/subscriptions","organizations_url":"https://api.github.com/users/minorninth/orgs","repos_url":"https://api.github.com/users/minorninth/repos","events_url":"https://api.github.com/users/minorninth/events{/privacy}","received_events_url":"https://api.github.com/users/minorninth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-30T15:49:07Z","updated_at":"2018-05-30T22:42:21Z","closed_at":null,"author_association":"NONE","body":"@domenic left some comments on ARIA reflection here: https://github.com/WICG/aom/pull/117 - I'm going to try to copy the relevant sections.\r\n\r\n> Enumerated attributes and missing/invalid value defaults\r\n> The first is that the existing ARIA spec isn't clear on how these attributes behave, i.e. it does not specify the missing and invalid value defaults, or what the case-sensitivity of each value is, etc.\r\n\r\nI think the ARIA spec clearly says that attribute values are not case-sensitive, and that empty strings should be treated the same as missing strings.\r\n\r\nHowever, I can't find any clear language on how invalid values should be treated.\r\n\r\n> For example, https://w3c.github.io/aria/#aria-busy lists two values: \"false (default)\" and \"true\". A way to formalize this so that it works with the reflect infrastructure would be to add something like the following prologue before the definition of all attributes:\r\n> \r\n> Various content attributes defined herein have a table listing their valid values. Such attributes are enumerated attributes, whose states and corresponding keywords are given by the first-column of the values table. One row in the value stable will have the suffix \" (default)\"; this suffix is to be excluded when determining the state/keyword name. The state given by the row marked as \" (default)\" is the invalid value default and missing value default for such an attribute.\r\n> \r\n> The consequences of this would be that, for example, the browser must interpret aria-busy=\"TRuE\" the same as aria-busy=\"true\". And, aria-busy=\"\", aria-busy=\"asdf\", or no aria-busy=\"\" attribute at all, must all be interpreted the same as aria-busy=\"false\". Hopefully that is already how browsers behave, and it's just the case that nobody ever wrote it down?\r\n\r\nI believe this is what was intended and how most browsers behave now, but we should maybe clarify this.\r\n\r\n> Limited to only known values?\r\n> For the enumerated attribute cases, where there's a Values table, you can choose between three models: \"limited to only known values\", nullable, and default. These correspond to paragraphs 4, 5, and 6 of the reflection section. They differ in how they treat invalid, default, and null values.\r\n> \r\n> Consider the element <div aria-invalid=\"asdf\" aria-busy=\"false\">. Note that aria-invalid's default is also \"false\", and aria-live's default is \"off\". The models then give:\r\n> \r\n> Limited to only known values: div.ariaInvalid === \"false\", div.ariaBusy === \"false\", div.ariaLive === \"off\". Setting to null is the same as setting to \"null\".\r\n> Nullable: div.ariaInvalid === null, div.ariaBusy === null, div.ariaLive === null. Setting to null removes the attribute.\r\n> Default: div.ariaInvalid === \"asdf\", div.ariaBusy === \"false\", div.ariaLive === \"\". Setting to null is the same as setting to \"null\".\r\n> The most popular choice among existing reflected HTML enumerated attributes is \"limited to only known values\". Nullable seems to only be used for crossOrigin, and default seems to be used for older things like textarea.wrap and marquee.direction.\r\n> \r\n> In this case, you'd want to remove the ?s from the IDL, and add something to the above-mentioned prologue stating that these are all limited to only known values.\r\n\r\nIt's not clear whether we want these properties to \"validate\" and limit themselves to only known values. My main concern there is that some browsers like Firefox pass through many ARIA attributes unmodified, allowing authors to try out new proposed attribute values before they're official. Forcing the browser to validate these attribute values would possibly be a departure from past expectations. So I might lean towards not validating.\r\n\r\n> Non-enumerated attributes\r\n> Not all of the reflected attributes are enumerated attributes.\r\n> \r\n> For example, aria-valuemin's \"Value\" is described as a \"number\". Probably the type should be double, not DOMString?.\r\n> \r\n> For the ones listed as \"integer\", it should probably be unsigned long. Also, for example, aria-posinset says authors must set it to something greater than or equal to 1; perhaps you should use limited to only non-negative numbers greater than zero? (Aside: why did we not call that \"positive numbers\"??)\r\n> \r\n> For the ones whose value is \"string\", like aria-roledescription, it appears that we currently don't have the technology in HTML for reflecting as a nullable string, i.e. DOMString?. For example, given const u = document.createElement(\"ul\"), there is no way to use u.type to distinguish between \"has a type attribute with the empty string value\" vs. \"does not have a type attribute\". This seems pretty lame, and I'm happy to add something to HTML to allow you to reflect as a DOMString? in the way you're probably expecting. But, it'd be good to confirm that this is worthwhile: are there string-valued ARIA attributes that have different behavior when you do e.g. aria-roledescription=\"\" vs. just omitting aria-roledescription entirely? If empty-string is the same as omission for these cases, maybe we should just go with the flow.\r\n\r\nI think this one is easy: the ARIA spec already says that empty strings are the same as no attribute.\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/aria/issues/comments/393342986","html_url":"https://github.com/w3c/aria/issues/777#issuecomment-393342986","issue_url":"https://api.github.com/repos/w3c/aria/issues/777","id":393342986,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzM0Mjk4Ng==","user":{"login":"jnurthen","id":1724479,"node_id":"MDQ6VXNlcjE3MjQ0Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1724479?v=4","gravatar_id":"","url":"https://api.github.com/users/jnurthen","html_url":"https://github.com/jnurthen","followers_url":"https://api.github.com/users/jnurthen/followers","following_url":"https://api.github.com/users/jnurthen/following{/other_user}","gists_url":"https://api.github.com/users/jnurthen/gists{/gist_id}","starred_url":"https://api.github.com/users/jnurthen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnurthen/subscriptions","organizations_url":"https://api.github.com/users/jnurthen/orgs","repos_url":"https://api.github.com/users/jnurthen/repos","events_url":"https://api.github.com/users/jnurthen/events{/privacy}","received_events_url":"https://api.github.com/users/jnurthen/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T22:42:21Z","updated_at":"2018-05-30T22:42:21Z","author_association":"CONTRIBUTOR","body":"> I think the ARIA spec clearly says that attribute values are not case-sensitive\r\nI can't find any reference to case sensitivity in the ARIA spec. If you think it is there can you point me to where? ARIA in HTML states clearly that values ARE case sensitive https://www.w3.org/TR/html-aria/#case-sensitivity when using ARIA in HTML.\r\n\r\n>and that empty strings should be treated the same as missing strings.\r\nThis is covered at https://w3c.github.io/aria/#state_property_processing\r\n\"Sometimes states and properties are present in the DOM but have a zero-length string (\"\") as their value. This is equivalent to their absence.\"\r\n\r\n>However, I can't find any clear language on how invalid values should be treated.\r\nNor can I - we need to deal with this - unless someone else can point to the text.\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"jnurthen"}}