-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(standards): add ariaRoles standard #2328
Conversation
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Now that the structure is finalized I added all the roles to the table, generating the list automatically using a custom script on the 1.0 spec page. I then created a script to diff the generated file against our current lookup table and modified the output as needed to match (putting comments where and why changes were made). The final output of the diff contains things I believe we are OK with but am putting here for reference. They are mostly additional aria allowed attrs that the current lookup table did not have but the spec allows. I tested ====== combobox.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: combobox.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-activedescendant',
'aria-autocomplete',
'aria-controls',
'aria-orientation',
'aria-readonly',
'aria-required' ],
expected:
[ 'aria-activedescendant',
'aria-autocomplete',
'aria-orientation',
'aria-required' ],
operator: 'deepEqual' }
====== menuitemcheckbox.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: menuitemcheckbox.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-checked',
'aria-posinset',
'aria-readonly',
'aria-setsize' ],
expected: [ 'aria-checked', 'aria-posinset', 'aria-setsize' ],
operator: 'deepEqual' }
====== menuitemradio.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: menuitemradio.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-checked',
'aria-posinset',
'aria-readonly',
'aria-setsize' ],
expected:
[ 'aria-checked',
'aria-posinset',
'aria-selected',
'aria-setsize' ],
operator: 'deepEqual' }
====== radio.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: radio.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-checked',
'aria-posinset',
'aria-required',
'aria-setsize' ],
expected:
[ 'aria-checked',
'aria-posinset',
'aria-required',
'aria-selected',
'aria-setsize' ],
operator: 'deepEqual' }
====== scrollbar.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: scrollbar.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-controls',
'aria-orientation',
'aria-valuemax',
'aria-valuemin',
'aria-valuenow',
'aria-valuetext' ],
expected:
[ 'aria-orientation',
'aria-valuemax',
'aria-valuemin',
'aria-valuetext' ],
operator: 'deepEqual' }
====== separator.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: separator.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-orientation',
'aria-valuemax',
'aria-valuemin',
'aria-valuenow',
'aria-valuetext' ],
expected:
[ 'aria-expanded',
'aria-orientation',
'aria-valuemax',
'aria-valuemin',
'aria-valuenow',
'aria-valuetext' ],
operator: 'deepEqual' }
====== slider.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: slider.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-orientation',
'aria-readonly',
'aria-valuemax',
'aria-valuemin',
'aria-valuenow',
'aria-valuetext' ],
expected:
[ 'aria-orientation',
'aria-readonly',
'aria-valuemax',
'aria-valuemin',
'aria-valuetext' ],
operator: 'deepEqual' }
====== spinbutton.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: spinbutton.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual:
[ 'aria-activedescendant',
'aria-readonly',
'aria-required',
'aria-valuemax',
'aria-valuemin',
'aria-valuenow',
'aria-valuetext' ],
expected:
[ 'aria-readonly',
'aria-required',
'aria-valuemax',
'aria-valuemin',
'aria-valuetext' ],
operator: 'deepEqual' }
====== switch.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: switch.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual: [ 'aria-readonly' ],
expected: [],
operator: 'deepEqual' }
====== table.allowedAttrs ======
{ AssertionError [ERR_ASSERTION]: table.allowedAttrs does not match
at file:///Users/stevenlambert/deque/axe-core/diff.mjs:55:14
at ModuleJob.run (internal/modules/esm/module_job.js:95:12)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual: [ 'aria-colcount', 'aria-expanded', 'aria-rowcount' ],
expected: [ 'aria-colcount', 'aria-rowcount' ],
operator: 'deepEqual' } |
This is the first part of the standards role table. Since there are >100 roles we need to do, I think splitting it out into smaller part will make the review much easier. These are the first 25 roles.
I haven't made any significant changes to the table other than those discussed in the proposal:
attributes
object to just beallowedAttrs
andrequiredAttrs
owned
object to just be an arrayallowedElements
property as that will be controlled by thehtml-elms
standards objectAs a note,
aria-errormessage
is a global attribute in the 1.1 spec so isn't listed in anyallowedAttrs
for that reason.Lastly, to help with the role table being so large, I think we should split the dpub roles into their own object (
dpub-roles
) and combine them with the aria-roles object into thestandards
object. They don't get used a lot and just take up room in the aria table (they're also a different spec).Part of issues: #2108, #2303, and #2243
Reviewer checks
Required fields, to be filled out by PR reviewer(s)