diff --git a/__tests__/src/elementRoleMap-test.js b/__tests__/src/elementRoleMap-test.js index 3dc1710..3d4a79b 100644 --- a/__tests__/src/elementRoleMap-test.js +++ b/__tests__/src/elementRoleMap-test.js @@ -52,11 +52,13 @@ const entriesList = [ [{"name": "div"}, ["generic"]], [{"constraints": ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "footer"}, ["generic"]], [{"constraints": ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "header"}, ["generic"]], - [{"name": "hgroup"}, ["generic"]], + [{"name": "hgroup"}, ["group"]], [{"name": "i"}, ["generic"]], [{"name": "pre"}, ["generic"]], [{"name": "q"}, ["generic"]], + [{"name": "s"}, ["deletion"]], [{"name": "samp"}, ["generic"]], + [{"name": "search"}, ["search"]], [{"name": "section"}, ["generic"]], [{"name": "small"}, ["generic"]], [{"name": "span"}, ["generic"]], @@ -132,7 +134,7 @@ const entriesList = [ test('elementRoleMap API', (t) => { const predicate = (obj, [o]) => deepEqual(o, obj); - testIteration(t, elementRoleMap, entriesList, 113, predicate); + testIteration(t, elementRoleMap, entriesList, 115, predicate); testForEach(t, elementRoleMap, entriesList, predicate); diff --git a/__tests__/src/roleElementMap-test.js b/__tests__/src/roleElementMap-test.js index 3705a61..74ffdf0 100644 --- a/__tests__/src/roleElementMap-test.js +++ b/__tests__/src/roleElementMap-test.js @@ -22,16 +22,16 @@ const entriesList = [ ["complementary", [{"constraints": ["scoped to the body element", "scoped to the main element"], "name": "aside"}, {"attributes": [{"constraints": ["set"], "name": "aria-label"}], "constraints": ["scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "aside"}, {"attributes": [{"constraints": ["set"], "name": "aria-labelledby"}], "constraints": ["scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "aside"}]], ["contentinfo", [{"constraints": ["scoped to the body element"], "name": "footer"}]], ["definition", [{"name": "dd"}]], - ["deletion", [{"name": "del"}]], + ["deletion", [{"name": "del"}, {"name": "s"}]], ["dialog", [{"name": "dialog"}]], ["document", [{"name": "html"}]], ["emphasis", [{"name": "em"}]], ["figure", [{"name": "figure"}]], ["form", [{"attributes": [{"constraints": ["set"], "name": "aria-label"}], "name": "form"}, {"attributes": [{"constraints": ["set"], "name": "aria-labelledby"}], "name": "form"}, {"attributes": [{"constraints": ["set"], "name": "name"}], "name": "form"}]], - ["generic", [{"name": "a"}, {"name": "area"}, {"name": "aside"}, {"name": "b"}, {"name": "bdo"}, {"name": "body"}, {"name": "data"}, {"name": "div"}, {"constraints": ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "footer"}, {"constraints": ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "header"}, {"name": "hgroup"}, {"name": "i"}, {"name": "pre"}, {"name": "q"}, {"name": "samp"}, {"name": "section"}, {"name": "small"}, {"name": "span"}, {"name": "u"}]], + ["generic", [{"name": "a"}, {"name": "area"}, {"name": "aside"}, {"name": "b"}, {"name": "bdo"}, {"name": "body"}, {"name": "data"}, {"name": "div"}, {"constraints": ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "footer"}, {"constraints": ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"], "name": "header"}, {"name": "i"}, {"name": "pre"}, {"name": "q"}, {"name": "samp"}, {"name": "section"}, {"name": "small"}, {"name": "span"}, {"name": "u"}]], ["grid", [{"attributes": [{"name": "role", "value": "grid"}], "name": "table"}]], ["gridcell", [{"constraints": ["ancestor table element has grid role", "ancestor table element has treegrid role"], "name": "td"}]], - ["group", [{"name": "details"}, {"name": "fieldset"}, {"name": "optgroup"}, {"name": "address"}]], + ["group", [{"name": "address"}, {"name": "details"}, {"name": "fieldset"}, {"name": "hgroup"}, {"name": "optgroup"}]], ["heading", [{"name": "h1"}, {"name": "h2"}, {"name": "h3"}, {"name": "h4"}, {"name": "h5"}, {"name": "h6"}]], ["img", [{"attributes": [{"constraints": ["set"], "name": "alt"}], "name": "img"}, {"attributes": [{"constraints": ["undefined"], "name": "alt"}], "name": "img"}]], ["insertion", [{"name": "ins"}]], @@ -54,6 +54,7 @@ const entriesList = [ ["rowgroup", [{"name": "tbody"}, {"name": "tfoot"}, {"name": "thead"}]], ["rowheader", [{"attributes": [{"name": "scope", "value": "row"}], "name": "th"}, {"attributes": [{"name": "scope", "value": "rowgroup"}], "name": "th"}]], ["section", [{"attributes": [{"name": "aria-label"}], "name": "section"}, {"attributes": [{"name": "aria-labelledby"}], "name": "section"}]], + ["search", [{"name": "search"}]], ["searchbox", [{"attributes": [{"constraints": ["undefined"], "name": "list"}, {"name": "type", "value": "search"}], "constraints": ["the list attribute is not set"], "name": "input"}]], ["separator", [{"name": "hr"}]], ["slider", [{"attributes": [{"name": "type", "value": "range"}], "name": "input"}]], @@ -73,7 +74,7 @@ const entriesList = [ test('roleElementMap API', (t) => { const predicate = (role, [r]) => role === r; - testIteration(t, roleElementMap, entriesList, 56, predicate); + testIteration(t, roleElementMap, entriesList, 57, predicate); testForEach(t, roleElementMap, entriesList, predicate); diff --git a/scripts/roles.json b/scripts/roles.json index e101e9d..3d8d0c0 100644 --- a/scripts/roles.json +++ b/scripts/roles.json @@ -988,6 +988,12 @@ "name": "del" }, "module": "HTML" + }, + { + "concept": { + "name": "s" + }, + "module": "HTML" } ], "requiredContextRole": [], @@ -3109,12 +3115,6 @@ }, "module": "HTML" }, - { - "concept": { - "name": "hgroup" - }, - "module": "HTML" - }, { "concept": { "name": "i" @@ -3447,6 +3447,12 @@ "aria-roledescription" ], "relatedConcepts": [ + { + "concept": { + "name": "address" + }, + "module": "HTML" + }, { "concept": { "name": "details" @@ -3461,13 +3467,13 @@ }, { "concept": { - "name": "optgroup" + "name": "hgroup" }, "module": "HTML" }, { "concept": { - "name": "address" + "name": "optgroup" }, "module": "HTML" } @@ -5174,7 +5180,14 @@ "aria-relevant", "aria-roledescription" ], - "relatedConcepts": [], + "relatedConcepts": [ + { + "concept": { + "name": "search" + }, + "module": "HTML" + } + ], "requiredContextRole": [], "requiredOwnedElements": [], "requiredProps": [], diff --git a/src/etc/roles/literal/deletionRole.js b/src/etc/roles/literal/deletionRole.js index 4ca5f53..e399573 100644 --- a/src/etc/roles/literal/deletionRole.js +++ b/src/etc/roles/literal/deletionRole.js @@ -21,6 +21,12 @@ const deletionRole: ARIARoleDefinition = { }, module: 'HTML', }, + { + concept: { + name: 's', + }, + module: 'HTML', + }, ], requireContextRole: [], requiredContextRole: [], diff --git a/src/etc/roles/literal/genericRole.js b/src/etc/roles/literal/genericRole.js index e929a41..0989449 100644 --- a/src/etc/roles/literal/genericRole.js +++ b/src/etc/roles/literal/genericRole.js @@ -85,12 +85,6 @@ const genericRole: ARIARoleDefinition = { }, module: 'HTML', }, - { - concept: { - name: 'hgroup', - }, - module: 'HTML', - }, { concept: { name: 'i', diff --git a/src/etc/roles/literal/groupRole.js b/src/etc/roles/literal/groupRole.js index 4ab57c0..deeccaa 100644 --- a/src/etc/roles/literal/groupRole.js +++ b/src/etc/roles/literal/groupRole.js @@ -15,6 +15,12 @@ const groupRole: ARIARoleDefinition = { 'aria-disabled': null, }, relatedConcepts: [ + { + concept: { + name: 'address', + }, + module: 'HTML', + }, { concept: { name: 'details', @@ -29,13 +35,13 @@ const groupRole: ARIARoleDefinition = { }, { concept: { - name: 'optgroup', + name: 'hgroup', }, module: 'HTML', }, { concept: { - name: 'address', + name: 'optgroup', }, module: 'HTML', }, diff --git a/src/etc/roles/literal/searchRole.js b/src/etc/roles/literal/searchRole.js index af5504f..0bf1745 100644 --- a/src/etc/roles/literal/searchRole.js +++ b/src/etc/roles/literal/searchRole.js @@ -11,7 +11,14 @@ const searchRole: ARIARoleDefinition = { ], prohibitedProps: [], props: {}, - relatedConcepts: [], + relatedConcepts: [ + { + concept: { + name: 'search', + }, + module: 'HTML', + }, + ], requireContextRole: [], requiredContextRole: [], requiredOwnedElements: [],