aria-query
Advanced tools
Comparing version 5.1.3 to 5.2.0
@@ -23,2 +23,6 @@ "use strict"; | ||
'values': ['inline', 'list', 'both', 'none'] | ||
}], ['aria-braillelabel', { | ||
'type': 'string' | ||
}], ['aria-brailleroledescription', { | ||
'type': 'string' | ||
}], ['aria-busy', { | ||
@@ -41,2 +45,4 @@ 'type': 'boolean' | ||
'type': 'idlist' | ||
}], ['aria-description', { | ||
'type': 'string' | ||
}], ['aria-details', { | ||
@@ -43,0 +49,0 @@ 'type': 'id' |
@@ -28,10 +28,9 @@ "use strict"; | ||
if (relation.module === 'HTML') { | ||
var concept = relation.concept; | ||
if (concept) { | ||
(function () { | ||
var conceptStr = JSON.stringify(concept); | ||
(function () { | ||
var concept = relation.concept; | ||
if (concept) { | ||
var elementRoleRelation = elementRoles.find(function (relation) { | ||
return JSON.stringify(relation[0]) === conceptStr; | ||
return (0, _deepEqual.default)(relation, concept); | ||
}); | ||
var roles = void 0; | ||
var roles; | ||
if (elementRoleRelation) { | ||
@@ -53,4 +52,4 @@ roles = elementRoleRelation[1]; | ||
elementRoles.push([concept, roles]); | ||
})(); | ||
} | ||
} | ||
})(); | ||
} | ||
@@ -83,3 +82,13 @@ } | ||
var item = elementRoles.find(function (tuple) { | ||
return (0, _deepEqual.default)(key, tuple[0]); | ||
if (key.name !== tuple[0].name) { | ||
return false; | ||
} | ||
if (Array.isArray(key.attributes)) { | ||
return key.attributes.every(function (attr) { | ||
return Array.isArray(tuple[0].attributes) && tuple[0].attributes.some(function (candidateAttr) { | ||
return attr.name === candidateAttr.name && attr.value === candidateAttr.value; | ||
}); | ||
}); | ||
} | ||
return true; | ||
}); | ||
@@ -86,0 +95,0 @@ return item && item[1]; |
@@ -15,8 +15,3 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'menuitem' | ||
}, | ||
module: 'HTML' | ||
}], | ||
relatedConcepts: [], | ||
requireContextRole: [], | ||
@@ -23,0 +18,0 @@ requiredContextRole: [], |
@@ -35,7 +35,2 @@ "use strict"; | ||
concept: { | ||
name: 'rel' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'role' | ||
@@ -42,0 +37,0 @@ }, |
@@ -17,2 +17,18 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-label' | ||
}], | ||
name: 'section' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-labelledby' | ||
}], | ||
name: 'section' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'frontmatter' | ||
@@ -19,0 +35,0 @@ }, |
@@ -44,2 +44,3 @@ "use strict"; | ||
var _mainRole = _interopRequireDefault(require("./literal/mainRole")); | ||
var _markRole = _interopRequireDefault(require("./literal/markRole")); | ||
var _marqueeRole = _interopRequireDefault(require("./literal/marqueeRole")); | ||
@@ -92,4 +93,4 @@ var _mathRole = _interopRequireDefault(require("./literal/mathRole")); | ||
var ariaLiteralRoles = [['alert', _alertRole.default], ['alertdialog', _alertdialogRole.default], ['application', _applicationRole.default], ['article', _articleRole.default], ['banner', _bannerRole.default], ['blockquote', _blockquoteRole.default], ['button', _buttonRole.default], ['caption', _captionRole.default], ['cell', _cellRole.default], ['checkbox', _checkboxRole.default], ['code', _codeRole.default], ['columnheader', _columnheaderRole.default], ['combobox', _comboboxRole.default], ['complementary', _complementaryRole.default], ['contentinfo', _contentinfoRole.default], ['definition', _definitionRole.default], ['deletion', _deletionRole.default], ['dialog', _dialogRole.default], ['directory', _directoryRole.default], ['document', _documentRole.default], ['emphasis', _emphasisRole.default], ['feed', _feedRole.default], ['figure', _figureRole.default], ['form', _formRole.default], ['generic', _genericRole.default], ['grid', _gridRole.default], ['gridcell', _gridcellRole.default], ['group', _groupRole.default], ['heading', _headingRole.default], ['img', _imgRole.default], ['insertion', _insertionRole.default], ['link', _linkRole.default], ['list', _listRole.default], ['listbox', _listboxRole.default], ['listitem', _listitemRole.default], ['log', _logRole.default], ['main', _mainRole.default], ['marquee', _marqueeRole.default], ['math', _mathRole.default], ['menu', _menuRole.default], ['menubar', _menubarRole.default], ['menuitem', _menuitemRole.default], ['menuitemcheckbox', _menuitemcheckboxRole.default], ['menuitemradio', _menuitemradioRole.default], ['meter', _meterRole.default], ['navigation', _navigationRole.default], ['none', _noneRole.default], ['note', _noteRole.default], ['option', _optionRole.default], ['paragraph', _paragraphRole.default], ['presentation', _presentationRole.default], ['progressbar', _progressbarRole.default], ['radio', _radioRole.default], ['radiogroup', _radiogroupRole.default], ['region', _regionRole.default], ['row', _rowRole.default], ['rowgroup', _rowgroupRole.default], ['rowheader', _rowheaderRole.default], ['scrollbar', _scrollbarRole.default], ['search', _searchRole.default], ['searchbox', _searchboxRole.default], ['separator', _separatorRole.default], ['slider', _sliderRole.default], ['spinbutton', _spinbuttonRole.default], ['status', _statusRole.default], ['strong', _strongRole.default], ['subscript', _subscriptRole.default], ['superscript', _superscriptRole.default], ['switch', _switchRole.default], ['tab', _tabRole.default], ['table', _tableRole.default], ['tablist', _tablistRole.default], ['tabpanel', _tabpanelRole.default], ['term', _termRole.default], ['textbox', _textboxRole.default], ['time', _timeRole.default], ['timer', _timerRole.default], ['toolbar', _toolbarRole.default], ['tooltip', _tooltipRole.default], ['tree', _treeRole.default], ['treegrid', _treegridRole.default], ['treeitem', _treeitemRole.default]]; | ||
var ariaLiteralRoles = [['alert', _alertRole.default], ['alertdialog', _alertdialogRole.default], ['application', _applicationRole.default], ['article', _articleRole.default], ['banner', _bannerRole.default], ['blockquote', _blockquoteRole.default], ['button', _buttonRole.default], ['caption', _captionRole.default], ['cell', _cellRole.default], ['checkbox', _checkboxRole.default], ['code', _codeRole.default], ['columnheader', _columnheaderRole.default], ['combobox', _comboboxRole.default], ['complementary', _complementaryRole.default], ['contentinfo', _contentinfoRole.default], ['definition', _definitionRole.default], ['deletion', _deletionRole.default], ['dialog', _dialogRole.default], ['directory', _directoryRole.default], ['document', _documentRole.default], ['emphasis', _emphasisRole.default], ['feed', _feedRole.default], ['figure', _figureRole.default], ['form', _formRole.default], ['generic', _genericRole.default], ['grid', _gridRole.default], ['gridcell', _gridcellRole.default], ['group', _groupRole.default], ['heading', _headingRole.default], ['img', _imgRole.default], ['insertion', _insertionRole.default], ['link', _linkRole.default], ['list', _listRole.default], ['listbox', _listboxRole.default], ['listitem', _listitemRole.default], ['log', _logRole.default], ['main', _mainRole.default], ['mark', _markRole.default], ['marquee', _marqueeRole.default], ['math', _mathRole.default], ['menu', _menuRole.default], ['menubar', _menubarRole.default], ['menuitem', _menuitemRole.default], ['menuitemcheckbox', _menuitemcheckboxRole.default], ['menuitemradio', _menuitemradioRole.default], ['meter', _meterRole.default], ['navigation', _navigationRole.default], ['none', _noneRole.default], ['note', _noteRole.default], ['option', _optionRole.default], ['paragraph', _paragraphRole.default], ['presentation', _presentationRole.default], ['progressbar', _progressbarRole.default], ['radio', _radioRole.default], ['radiogroup', _radiogroupRole.default], ['region', _regionRole.default], ['row', _rowRole.default], ['rowgroup', _rowgroupRole.default], ['rowheader', _rowheaderRole.default], ['scrollbar', _scrollbarRole.default], ['search', _searchRole.default], ['searchbox', _searchboxRole.default], ['separator', _separatorRole.default], ['slider', _sliderRole.default], ['spinbutton', _spinbuttonRole.default], ['status', _statusRole.default], ['strong', _strongRole.default], ['subscript', _subscriptRole.default], ['superscript', _superscriptRole.default], ['switch', _switchRole.default], ['tab', _tabRole.default], ['table', _tableRole.default], ['tablist', _tablistRole.default], ['tabpanel', _tabpanelRole.default], ['term', _termRole.default], ['textbox', _textboxRole.default], ['time', _timeRole.default], ['timer', _timerRole.default], ['toolbar', _toolbarRole.default], ['tooltip', _tooltipRole.default], ['tree', _treeRole.default], ['treegrid', _treegridRole.default], ['treeitem', _treeitemRole.default]]; | ||
var _default = ariaLiteralRoles; | ||
exports.default = _default; |
@@ -12,3 +12,3 @@ "use strict"; | ||
childrenPresentational: false, | ||
nameFrom: ['author', 'content'], | ||
nameFrom: ['author', 'contents'], | ||
prohibitedProps: [], | ||
@@ -15,0 +15,0 @@ props: { |
@@ -17,3 +17,3 @@ "use strict"; | ||
concept: { | ||
constraints: ['direct descendant of document'], | ||
constraints: ['scoped to the body element'], | ||
name: 'header' | ||
@@ -20,0 +20,0 @@ }, |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'blockquote' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -23,34 +23,3 @@ "use strict"; | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-pressed' | ||
}, { | ||
name: 'type', | ||
value: 'checkbox' | ||
}], | ||
name: 'input' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-expanded', | ||
value: 'false' | ||
}], | ||
name: 'summary' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-expanded', | ||
value: 'true' | ||
}], | ||
constraints: ['direct descendant of details element with the open attribute defined'], | ||
name: 'summary' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'type', | ||
value: 'button' | ||
@@ -57,0 +26,0 @@ }], |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'caption' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: ['figure', 'grid', 'table'], | ||
@@ -18,0 +23,0 @@ requiredContextRole: ['figure', 'grid', 'table'], |
@@ -22,3 +22,3 @@ "use strict"; | ||
concept: { | ||
constraints: ['descendant of table'], | ||
constraints: ['ancestor table element has table role'], | ||
name: 'td' | ||
@@ -25,0 +25,0 @@ }, |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'code' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -18,6 +18,2 @@ "use strict"; | ||
relatedConcepts: [{ | ||
attributes: [{ | ||
name: 'scope', | ||
value: 'col' | ||
}], | ||
concept: { | ||
@@ -27,2 +23,20 @@ name: 'th' | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'scope', | ||
value: 'col' | ||
}], | ||
name: 'th' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'scope', | ||
value: 'colgroup' | ||
}], | ||
name: 'th' | ||
}, | ||
module: 'HTML' | ||
}], | ||
@@ -29,0 +43,0 @@ requireContextRole: ['row'], |
@@ -27,3 +27,4 @@ "use strict"; | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-controls' | ||
}, { | ||
name: 'list' | ||
@@ -34,2 +35,3 @@ }, { | ||
}], | ||
constraints: ['the aria-controls attribute is set to the same value as the list attribute'], | ||
name: 'input' | ||
@@ -41,3 +43,4 @@ }, | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-controls' | ||
}, { | ||
name: 'list' | ||
@@ -48,2 +51,3 @@ }, { | ||
}], | ||
constraints: ['the aria-controls attribute is set to the same value as the list attribute'], | ||
name: 'input' | ||
@@ -55,3 +59,4 @@ }, | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-controls' | ||
}, { | ||
name: 'list' | ||
@@ -62,2 +67,3 @@ }, { | ||
}], | ||
constraints: ['the aria-controls attribute is set to the same value as the list attribute'], | ||
name: 'input' | ||
@@ -69,3 +75,4 @@ }, | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-controls' | ||
}, { | ||
name: 'list' | ||
@@ -76,2 +83,3 @@ }, { | ||
}], | ||
constraints: ['the aria-controls attribute is set to the same value as the list attribute'], | ||
name: 'input' | ||
@@ -83,3 +91,4 @@ }, | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-controls' | ||
}, { | ||
name: 'list' | ||
@@ -90,2 +99,3 @@ }, { | ||
}], | ||
constraints: ['the aria-controls attribute is set to the same value as the list attribute'], | ||
name: 'input' | ||
@@ -97,3 +107,4 @@ }, | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-controls' | ||
}, { | ||
name: 'list' | ||
@@ -104,2 +115,3 @@ }, { | ||
}], | ||
constraints: ['the aria-controls attribute is set to the same value as the list attribute'], | ||
name: 'input' | ||
@@ -111,8 +123,7 @@ }, | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'multiple' | ||
}, { | ||
constraints: ['undefined'], | ||
name: 'size' | ||
}], | ||
constraints: ['the multiple attribute and the size attribute do not have a value greater than 1'], | ||
name: 'select' | ||
@@ -123,16 +134,4 @@ }, | ||
concept: { | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'multiple' | ||
}, { | ||
name: 'size', | ||
value: 1 | ||
}], | ||
name: 'select' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'select' | ||
}, | ||
module: 'XForms' | ||
@@ -139,0 +138,0 @@ }], |
@@ -17,5 +17,18 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-label' | ||
}], | ||
constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'], | ||
name: 'aside' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-labelledby' | ||
}], | ||
constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'], | ||
name: 'aside' | ||
}, | ||
module: 'HTML' | ||
}], | ||
@@ -22,0 +35,0 @@ requireContextRole: [], |
@@ -17,3 +17,3 @@ "use strict"; | ||
concept: { | ||
constraints: ['direct descendant of document'], | ||
constraints: ['scoped to the body element'], | ||
name: 'footer' | ||
@@ -20,0 +20,0 @@ }, |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'del' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -21,3 +21,3 @@ "use strict"; | ||
concept: { | ||
name: 'body' | ||
name: 'html' | ||
}, | ||
@@ -24,0 +24,0 @@ module: 'HTML' |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'em' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -18,3 +18,2 @@ "use strict"; | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-label' | ||
@@ -28,3 +27,2 @@ }], | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-labelledby' | ||
@@ -38,3 +36,2 @@ }], | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'name' | ||
@@ -41,0 +38,0 @@ }], |
@@ -17,3 +17,3 @@ "use strict"; | ||
concept: { | ||
name: 'span' | ||
name: 'a' | ||
}, | ||
@@ -23,5 +23,92 @@ module: 'HTML' | ||
concept: { | ||
name: 'area' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'aside' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'b' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'bdo' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'body' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'data' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'div' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'], | ||
name: 'footer' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'], | ||
name: 'header' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'hgroup' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'i' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'pre' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'q' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'samp' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'section' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'small' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'span' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'u' | ||
}, | ||
module: 'HTML' | ||
}], | ||
@@ -28,0 +115,0 @@ requireContextRole: [], |
@@ -26,6 +26,3 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
name: 'role', | ||
value: 'gridcell' | ||
}], | ||
constraints: ['ancestor table element has grid role'], | ||
name: 'td' | ||
@@ -32,0 +29,0 @@ }, |
@@ -18,12 +18,3 @@ "use strict"; | ||
}, | ||
relatedConcepts: [{ | ||
concept: { | ||
attributes: [{ | ||
name: 'role', | ||
value: 'grid' | ||
}], | ||
name: 'table' | ||
}, | ||
module: 'HTML' | ||
}], | ||
relatedConcepts: [], | ||
requireContextRole: [], | ||
@@ -30,0 +21,0 @@ requiredContextRole: [], |
@@ -33,2 +33,7 @@ "use strict"; | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'address' | ||
}, | ||
module: 'HTML' | ||
}], | ||
@@ -35,0 +40,0 @@ requireContextRole: [], |
@@ -17,6 +17,2 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'alt' | ||
}], | ||
name: 'img' | ||
@@ -27,11 +23,2 @@ }, | ||
concept: { | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'alt' | ||
}], | ||
name: 'img' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'imggroup' | ||
@@ -38,0 +25,0 @@ }, |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'ins' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -35,10 +35,2 @@ "use strict"; | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
attributes: [{ | ||
name: 'href' | ||
}], | ||
name: 'link' | ||
}, | ||
module: 'HTML' | ||
}], | ||
@@ -45,0 +37,0 @@ requireContextRole: [], |
@@ -26,3 +26,2 @@ "use strict"; | ||
attributes: [{ | ||
constraints: ['>1'], | ||
name: 'size' | ||
@@ -32,2 +31,3 @@ }, { | ||
}], | ||
constraints: ['the size attribute value is greater than 1'], | ||
name: 'select' | ||
@@ -39,5 +39,5 @@ }, | ||
attributes: [{ | ||
constraints: ['>1'], | ||
name: 'size' | ||
}], | ||
constraints: ['the size attribute value is greater than 1'], | ||
name: 'select' | ||
@@ -51,2 +51,3 @@ }, | ||
}], | ||
constraints: ['the multiple attribute value is greater than 1'], | ||
name: 'select' | ||
@@ -57,2 +58,7 @@ }, | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-multiselectable', | ||
value: 'true' | ||
}], | ||
constraints: ['the datalist selection model allows multiple option elements to be selected at a time'], | ||
name: 'datalist' | ||
@@ -63,2 +69,11 @@ }, | ||
concept: { | ||
name: 'datalist', | ||
attributes: [{ | ||
name: 'aria-multiselectable', | ||
value: 'false' | ||
}] | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'list' | ||
@@ -65,0 +80,0 @@ }, |
@@ -21,3 +21,3 @@ "use strict"; | ||
concept: { | ||
constraints: ['direct descendant of ol, ul or menu'], | ||
constraints: ['direct descendant of ol', 'direct descendant of ul', 'direct descendant of menu'], | ||
name: 'li' | ||
@@ -24,0 +24,0 @@ }, |
@@ -28,12 +28,2 @@ "use strict"; | ||
concept: { | ||
name: 'listitem' | ||
}, | ||
module: 'ARIA' | ||
}, { | ||
concept: { | ||
name: 'menuitem' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'option' | ||
@@ -40,0 +30,0 @@ }, |
@@ -19,3 +19,8 @@ "use strict"; | ||
}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'meter' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -22,0 +27,0 @@ requiredContextRole: [], |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'p' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -15,3 +15,12 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
attributes: [{ | ||
name: 'alt', | ||
value: '' | ||
}], | ||
name: 'img' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +27,0 @@ requiredContextRole: [], |
@@ -24,2 +24,16 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-valuemax' | ||
}, { | ||
name: 'aria-valuemin', | ||
value: 0 | ||
}, { | ||
name: 'aria-valuenow' | ||
}], | ||
constraints: ['the progress bar is determinate'], | ||
name: 'progress' | ||
}, | ||
module: 'HTML' | ||
}, { | ||
concept: { | ||
name: 'status' | ||
@@ -26,0 +40,0 @@ }, |
@@ -18,3 +18,2 @@ "use strict"; | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-label' | ||
@@ -28,3 +27,2 @@ }], | ||
attributes: [{ | ||
constraints: ['set'], | ||
name: 'aria-labelledby' | ||
@@ -39,7 +37,2 @@ }], | ||
} | ||
}, { | ||
concept: { | ||
name: 'frame' | ||
}, | ||
module: 'HTML' | ||
}], | ||
@@ -46,0 +39,0 @@ requireContextRole: [], |
@@ -18,3 +18,2 @@ "use strict"; | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'list' | ||
@@ -25,2 +24,3 @@ }, { | ||
}], | ||
constraints: ['the list attribute is not set'], | ||
name: 'input' | ||
@@ -27,0 +27,0 @@ }, |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'strong' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'sub' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'sup' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -17,5 +17,8 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
name: 'aria-checked' | ||
}], | ||
name: 'button' | ||
}, | ||
module: 'ARIA' | ||
module: 'HTML' | ||
}], | ||
@@ -22,0 +25,0 @@ requireContextRole: [], |
@@ -27,9 +27,3 @@ "use strict"; | ||
concept: { | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'type' | ||
}, { | ||
constraints: ['undefined'], | ||
name: 'list' | ||
}], | ||
constraints: ['the list attribute is not set'], | ||
name: 'input' | ||
@@ -41,8 +35,6 @@ }, | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'list' | ||
}, { | ||
name: 'type', | ||
value: 'email' | ||
}], | ||
constraints: ['the list attribute is not set'], | ||
name: 'input' | ||
@@ -54,8 +46,6 @@ }, | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'list' | ||
}, { | ||
name: 'type', | ||
value: 'tel' | ||
}], | ||
constraints: ['the list attribute is not set'], | ||
name: 'input' | ||
@@ -67,8 +57,6 @@ }, | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'list' | ||
}, { | ||
name: 'type', | ||
value: 'text' | ||
}], | ||
constraints: ['the list attribute is not set'], | ||
name: 'input' | ||
@@ -80,8 +68,6 @@ }, | ||
attributes: [{ | ||
constraints: ['undefined'], | ||
name: 'list' | ||
}, { | ||
name: 'type', | ||
value: 'url' | ||
}], | ||
constraints: ['the list attribute is not set'], | ||
name: 'input' | ||
@@ -88,0 +74,0 @@ }, |
@@ -15,3 +15,8 @@ "use strict"; | ||
props: {}, | ||
relatedConcepts: [], | ||
relatedConcepts: [{ | ||
concept: { | ||
name: 'time' | ||
}, | ||
module: 'HTML' | ||
}], | ||
requireContextRole: [], | ||
@@ -18,0 +23,0 @@ requiredContextRole: [], |
@@ -19,5 +19,6 @@ "use strict"; | ||
var keys = _rolesMap.default.keys(); | ||
var _loop = function _loop(i) { | ||
for (var i = 0; i < keys.length; i++) { | ||
var key = keys[i]; | ||
var role = _rolesMap.default.get(key); | ||
var relationConcepts = []; | ||
if (role) { | ||
@@ -29,21 +30,11 @@ var concepts = [].concat(role.baseConcepts, role.relatedConcepts); | ||
var concept = relation.concept; | ||
if (concept) { | ||
var roleElementRelation = roleElement.find(function (item) { | ||
return item[0] === key; | ||
}); | ||
var relationConcepts = void 0; | ||
if (roleElementRelation) { | ||
relationConcepts = roleElementRelation[1]; | ||
} else { | ||
relationConcepts = []; | ||
} | ||
if (concept != null) { | ||
relationConcepts.push(concept); | ||
roleElement.push([key, relationConcepts]); | ||
} | ||
} | ||
} | ||
if (relationConcepts.length > 0) { | ||
roleElement.push([key, relationConcepts]); | ||
} | ||
} | ||
}; | ||
for (var i = 0; i < keys.length; i++) { | ||
_loop(i); | ||
} | ||
@@ -61,5 +52,5 @@ var roleElementMap = { | ||
var _step$value = _slicedToArray(_step.value, 2), | ||
key = _step$value[0], | ||
_key = _step$value[0], | ||
values = _step$value[1]; | ||
fn.call(thisArg, values, key, roleElement); | ||
fn.call(thisArg, values, _key, roleElement); | ||
} | ||
@@ -66,0 +57,0 @@ } catch (err) { |
{ | ||
"name": "aria-query", | ||
"version": "5.1.3", | ||
"version": "5.2.0", | ||
"description": "Programmatic access to the ARIA specification", | ||
@@ -69,4 +69,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"deep-equal": "^2.0.5" | ||
"dequal": "^2.0.3" | ||
} | ||
} |
@@ -5,4 +5,4 @@ # ARIA Query | ||
Programmatic access to the [WAI-ARIA 1.2 Roles Model](https://raw.githack.com/w3c/aria/stable/#roles). | ||
This package tracks the stable editor's draft (last update: 21 July 2020). | ||
Programmatic access to the [WAI-ARIA 1.2 Roles Model](https://www.w3.org/TR/wai-aria-1.2/#roles). | ||
This package tracks the W3C Recommendation (last update: 6 June 2023). | ||
@@ -9,0 +9,0 @@ CDN URL: <https://unpkg.com/aria-query> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192689
156
5743
+ Addeddequal@^2.0.3
+ Addeddequal@2.0.3(transitive)
- Removeddeep-equal@^2.0.5
- Removedarray-buffer-byte-length@1.0.1(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removeddeep-equal@2.2.3(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-get-iterator@1.1.3(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-bigints@1.0.2(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinternal-slot@1.0.7(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-array-buffer@3.0.4(transitive)
- Removedis-bigint@1.0.4(transitive)
- Removedis-boolean-object@1.1.2(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-map@2.0.3(transitive)
- Removedis-number-object@1.0.7(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-set@2.0.3(transitive)
- Removedis-shared-array-buffer@1.0.3(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedis-weakmap@2.0.2(transitive)
- Removedis-weakset@2.0.3(transitive)
- Removedisarray@2.0.5(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.5(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedregexp.prototype.flags@1.5.3(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedstop-iteration-iterator@1.0.0(transitive)
- Removedwhich-boxed-primitive@1.0.2(transitive)
- Removedwhich-collection@1.0.2(transitive)
- Removedwhich-typed-array@1.1.15(transitive)