diff --git a/lib/standards/aria-roles.js b/lib/standards/aria-roles.js index cb52d84240..95ba637130 100644 --- a/lib/standards/aria-roles.js +++ b/lib/standards/aria-roles.js @@ -39,11 +39,18 @@ const ariaRoles = { type: 'landmark', allowedAttrs: ['aria-expanded'] }, + blockquote: { + type: 'structure' + }, button: { type: 'widget', allowedAttrs: ['aria-expanded', 'aria-pressed'], nameFromContent: true }, + caption: { + type: 'structure', + requiredContext: ['figure', 'table', 'grid', 'treegrid'] + }, cell: { type: 'structure', requiredContext: ['row'], @@ -67,6 +74,9 @@ const ariaRoles = { allowedAttrs: ['aria-checked', 'aria-readonly', 'aria-required'], nameFromContent: true }, + code: { + type: 'structure' + }, columnheader: { type: 'structure', requiredContext: ['row'], @@ -117,6 +127,9 @@ const ariaRoles = { type: 'structure', allowedAttrs: ['aria-expanded'] }, + deletion: { + type: 'structure' + }, dialog: { type: 'widget', allowedAttrs: ['aria-expanded', 'aria-modal'] @@ -131,6 +144,9 @@ const ariaRoles = { type: 'structure', allowedAttrs: ['aria-expanded'] }, + emphasis: { + type: 'structure' + }, feed: { type: 'structure', requiredOwned: ['article'], @@ -191,6 +207,9 @@ const ariaRoles = { input: { type: 'abstract' }, + insertion: { + type: 'structure' + }, landmark: { type: 'abstract' }, @@ -284,6 +303,11 @@ const ariaRoles = { ], nameFromContent: true }, + meter: { + type: 'structure', + allowedAttrs: ['aria-valuetext'], + requiredAttrs: ['aria-valuemax', 'aria-valuemin', 'aria-valuenow'] + }, navigation: { type: 'landmark', allowedAttrs: ['aria-expanded'] @@ -309,6 +333,9 @@ const ariaRoles = { ], nameFromContent: true }, + paragraph: { + type: 'structure' + }, presentation: { type: 'structure' }, @@ -488,9 +515,18 @@ const ariaRoles = { type: 'widget', allowedAttrs: ['aria-expanded'] }, + strong: { + type: 'structure' + }, structure: { type: 'abstract' }, + subscript: { + type: 'structure' + }, + superscript: { + type: 'structure' + }, switch: { type: 'widget', requiredAttrs: ['aria-checked'], @@ -552,6 +588,9 @@ const ariaRoles = { 'aria-required' ] }, + time: { + type: 'structure' + }, timer: { type: 'widget', allowedAttrs: ['aria-expanded'] diff --git a/test/commons/standards/get-aria-roles-by-type.js b/test/commons/standards/get-aria-roles-by-type.js index 29be9a16f3..a83ffe528e 100644 --- a/test/commons/standards/get-aria-roles-by-type.js +++ b/test/commons/standards/get-aria-roles-by-type.js @@ -14,28 +14,40 @@ describe('standards.getAriaRolesByType', function() { var structureRoles = getAriaRolesByType('structure'); assert.deepEqual(structureRoles, [ 'article', + 'blockquote', + 'caption', 'cell', + 'code', 'columnheader', 'definition', + 'deletion', 'directory', 'document', + 'emphasis', 'feed', 'figure', 'group', 'heading', 'img', + 'insertion', 'list', 'listitem', 'math', + 'meter', 'none', 'note', + 'paragraph', 'presentation', 'row', 'rowgroup', 'rowheader', 'separator', + 'strong', + 'subscript', + 'superscript', 'table', 'term', + 'time', 'toolbar', 'tooltip' ]);