diff --git a/__tests__/src/elementRoleMap-test.js b/__tests__/src/elementRoleMap-test.js index 061ff56a..d8bad36b 100644 --- a/__tests__/src/elementRoleMap-test.js +++ b/__tests__/src/elementRoleMap-test.js @@ -112,6 +112,7 @@ const entriesList = [ [{"name": "strong"}, ["strong"]], [{"name": "sub"}, ["subscript"]], [{"name": "sup"}, ["superscript"]], + [{"name": "svg"}, ["graphics-document"]], [{"attributes": [{"name": "aria-checked"}], "name": "button"}, ["switch"]], [{"name": "table"}, ["table"]], [{"name": "dfn"}, ["term"]], @@ -128,7 +129,7 @@ const entriesList = [ test('elementRoleMap API', async (t) => { t.test('iteration', async (st) => { st.notEqual(elementRoleMap[Symbol.iterator], undefined, 'has an iterator defined'); - st.equal([...elementRoleMap].length, 112, 'has a specific length'); + st.equal([...elementRoleMap].length, 113, 'has a specific length'); st.test('supports the spread operator', async (s2t) => { [...elementRoleMap].forEach(([obj, roles]) => { diff --git a/__tests__/src/roleElementMap-test.js b/__tests__/src/roleElementMap-test.js index fdce43c1..086a5bde 100644 --- a/__tests__/src/roleElementMap-test.js +++ b/__tests__/src/roleElementMap-test.js @@ -58,6 +58,7 @@ const entriesList = [ ["strong", [{"name": "strong"}]], ["subscript", [{"name": "sub"}]], ["superscript", [{"name": "sup"}]], + ["graphics-document", [{"name": "svg"}]], ["switch", [{"attributes": [{"name": "aria-checked"}], "name": "button"}]], ["table", [{"name": "table"}]], ["term", [{"name": "dfn"}, {"name": "dt"}]], @@ -68,7 +69,7 @@ const entriesList = [ test('roleElementMap API', async (t) => { t.test('iteration', async (st) => { st.notEqual(roleElementMap[Symbol.iterator], undefined, 'has an iterator defined'); - st.equal([...roleElementMap].length, 55, 'has a specific length'); + st.equal([...roleElementMap].length, 56, 'has a specific length'); st.test('supports the spread operator', async (s2t) => { [...roleElementMap].forEach(([role, elements]) => { diff --git a/scripts/roles.json b/scripts/roles.json index 2d77a597..e101e9d1 100644 --- a/scripts/roles.json +++ b/scripts/roles.json @@ -3217,6 +3217,12 @@ "concept": { "name": "article" } + }, + { + "concept": { + "name": "svg" + }, + "module": "HTML" } ], "requiredContextRole": [], diff --git a/src/etc/roles/graphics/graphicsDocumentRole.js b/src/etc/roles/graphics/graphicsDocumentRole.js index 86d21df3..c5b6611f 100644 --- a/src/etc/roles/graphics/graphicsDocumentRole.js +++ b/src/etc/roles/graphics/graphicsDocumentRole.js @@ -36,6 +36,12 @@ const graphicsDocumentRole: ARIARoleDefinition = { name: 'article', }, }, + { + concept: { + name: 'svg', + }, + module: 'HTML', + }, ], requireContextRole: [], requiredContextRole: [],