Skip to content
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

[Breaking] WAI-ARIA 1.3 update #557

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

![CI](https://github.com/A11yance/aria-query/workflows/CI/badge.svg)

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).
Programmatic access to the [WAI-ARIA 1.3 Roles Model](https://www.w3.org/TR/wai-aria-1.3/#roles).
This package tracks the W3C Working Draft (last update: 23 January 2024).

CDN URL: <https://unpkg.com/aria-query>

Expand Down
6 changes: 3 additions & 3 deletions __tests__/src/elementRoleMap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const entriesList = [
[{"name": "h4"}, ["heading"]],
[{"name": "h5"}, ["heading"]],
[{"name": "h6"}, ["heading"]],
[{"attributes": [{"constraints": ["set"], "name": "alt"}], "name": "img"}, ["img"]],
[{"attributes": [{"constraints": ["undefined"], "name": "alt"}], "name": "img"}, ["img"]],
[{"attributes": [{"constraints": ["set"], "name": "alt"}], "name": "img"}, ["image", "img"]],
[{"attributes": [{"constraints": ["undefined"], "name": "alt"}], "name": "img"}, ["image", "img"]],
[{"name": "ins"}, ["insertion"]],
[{"attributes": [{"constraints": ["set"], "name": "href"}], "name": "a"}, ["link"]],
[{"attributes": [{"constraints": ["set"], "name": "href"}], "name": "area"}, ["link"]],
Expand All @@ -92,9 +92,9 @@ const entriesList = [
[{"name": "math"}, ["math"]],
[{"name": "meter"}, ["meter"]],
[{"name": "nav"}, ["navigation"]],
[{"attributes": [{"name": "alt", "value": ""}], "name": "img"}, ["none", "presentation"]],
[{"name": "option"}, ["option"]],
[{"name": "p"}, ["paragraph"]],
[{"attributes": [{"name": "alt", "value": ""}], "name": "img"}, ["presentation"]],
[{"name": "progress"}, ["progressbar"]],
[{"attributes": [{"name": "aria-valuemax"}, {"name": "aria-valuemin", "value": 0}, {"name": "aria-valuenow"}], "constraints": ["the progress bar is determinate"],"name": "progress"}, ["progressbar"]],
[{"attributes": [{"name": "type", "value": "radio"}], "name": "input"}, ["radio"]],
Expand Down
2 changes: 2 additions & 0 deletions __tests__/src/roleElementMap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const entriesList = [
["gridcell", [{"constraints": ["ancestor table element has grid role", "ancestor table element has treegrid role"], "name": "td"}]],
["group", [{"name": "address"}, {"name": "details"}, {"name": "fieldset"}, {"name": "hgroup"}, {"name": "optgroup"}]],
["heading", [{"name": "h1"}, {"name": "h2"}, {"name": "h3"}, {"name": "h4"}, {"name": "h5"}, {"name": "h6"}]],
["image", [{"attributes": [{"constraints": ["set"], "name": "alt"}], "name": "img"}, {"attributes": [{"constraints": ["undefined"], "name": "alt"}], "name": "img"}]],
["img", [{"attributes": [{"constraints": ["set"], "name": "alt"}], "name": "img"}, {"attributes": [{"constraints": ["undefined"], "name": "alt"}], "name": "img"}]],
["insertion", [{"name": "ins"}]],
["link", [{"attributes": [{"constraints": ["set"], "name": "href"}], "name": "a"}, {"attributes": [{"constraints": ["set"], "name": "href"}], "name": "area"}]],
Expand All @@ -44,6 +45,7 @@ const entriesList = [
["math", [{"name": "math"}]],
["meter", [{"name": "meter"}]],
["navigation", [{"name": "nav"}]],
["none", [{"attributes": [{"name": "alt", "value": ""}], "name": "img"}]],
["option", [{"name": "option"}]],
["paragraph", [{"name": "p"}]],
["presentation", [{"attributes": [{"name": "alt", "value": ""}], "name": "img"}]],
Expand Down
5 changes: 4 additions & 1 deletion __tests__/src/rolesMap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const entriesList = [
["code", null],
["columnheader", null],
["combobox", null],
["comment", null],
["command", null],
["complementary", null],
["composite", null],
Expand All @@ -38,6 +39,7 @@ const entriesList = [
["gridcell", null],
["group", null],
["heading", null],
["image", null],
["img", null],
["input", null],
["insertion", null],
Expand Down Expand Up @@ -85,6 +87,7 @@ const entriesList = [
["strong", null],
["structure", null],
["subscript", null],
["suggestion", null],
["superscript", null],
["switch", null],
["tab", null],
Expand Down Expand Up @@ -151,7 +154,7 @@ const entriesList = [
test('rolesMap API', (t) => {
const predicate = (role, [r]) => role === r;

testIteration(t, rolesMap, entriesList, 139, predicate);
testIteration(t, rolesMap, entriesList, 142, predicate);

testForEach(t, rolesMap, entriesList, predicate);

Expand Down
3 changes: 3 additions & 0 deletions flow/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type ARIADocumentStructureRole =
| 'blockquote'
| 'caption'
| 'cell'
| 'comment'
| 'columnheader'
| 'definition'
| 'deletion'
Expand All @@ -66,6 +67,7 @@ type ARIADocumentStructureRole =
| 'generic'
| 'group'
| 'heading'
| 'image'
| 'img'
| 'insertion'
| 'list'
Expand All @@ -83,6 +85,7 @@ type ARIADocumentStructureRole =
| 'separator'
| 'strong'
| 'subscript'
| 'suggestion'
| 'superscript'
| 'table'
| 'term'
Expand Down
Loading
Loading