Skip to content

Commit 8361a27

Browse files
authored
Plumb the graphics roles through to rolesMap (#444)
1 parent 1f1802d commit 8361a27

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

__tests__/src/rolesMap-test.js

+11-5
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,8 @@ describe('rolesMap API', function () {
860860
);
861861
});
862862
it('values', function () {
863-
expect(rolesMap.values().length).toEqual(133);
864-
expect([...rolesMap.values()].length).toEqual(133);
863+
expect(rolesMap.values().length).toEqual(136);
864+
expect([...rolesMap.values()].length).toEqual(136);
865865
});
866866
});
867867

@@ -871,7 +871,7 @@ describe('rolesMap', function () {
871871
expect(rolesMap[Symbol.iterator]).not.toBeUndefined();
872872
});
873873
it('should support the spread operator', function () {
874-
expect([...rolesMap].length).toEqual(133);
874+
expect([...rolesMap].length).toEqual(136);
875875
expect([...rolesMap]).toEqual(
876876
expect.arrayContaining(
877877
[
@@ -1007,7 +1007,10 @@ describe('rolesMap', function () {
10071007
["doc-qna", expect.any(Object)],
10081008
["doc-subtitle", expect.any(Object)],
10091009
["doc-tip", expect.any(Object)],
1010-
["doc-toc", expect.any(Object)]
1010+
["doc-toc", expect.any(Object)],
1011+
["graphics-document", expect.any(Object)],
1012+
["graphics-object", expect.any(Object)],
1013+
["graphics-symbol", expect.any(Object)],
10111014
]
10121015
)
10131016
);
@@ -1152,7 +1155,10 @@ describe('rolesMap', function () {
11521155
["doc-qna", expect.any(Object)],
11531156
["doc-subtitle", expect.any(Object)],
11541157
["doc-tip", expect.any(Object)],
1155-
["doc-toc", expect.any(Object)]
1158+
["doc-toc", expect.any(Object)],
1159+
["graphics-document", expect.any(Object)],
1160+
["graphics-object", expect.any(Object)],
1161+
["graphics-symbol", expect.any(Object)],
11561162
]
11571163
)
11581164
);

src/rolesMap.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
import ariaAbstractRoles from './etc/roles/ariaAbstractRoles';
66
import ariaLiteralRoles from './etc/roles/ariaLiteralRoles';
77
import ariaDpubRoles from './etc/roles/ariaDpubRoles';
8+
import ariaGraphicsRoles from './etc/roles/ariaGraphicsRoles';
89
import iterationDecorator from "./util/iterationDecorator";
910

1011
const roles: RoleDefinitions = [].concat(
1112
ariaAbstractRoles,
1213
ariaLiteralRoles,
13-
ariaDpubRoles
14+
ariaDpubRoles,
15+
ariaGraphicsRoles,
1416
);
1517

1618
roles.forEach(([

0 commit comments

Comments
 (0)