Skip to content

Commit

Permalink
Merge pull request #339 from A11yance/disclosure
Browse files Browse the repository at this point in the history
Remove the attribute information from the DisclosureTriangle concept
  • Loading branch information
jessebeach committed Aug 13, 2023
2 parents a8cccfe + b9b3e54 commit 1955973
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 49 deletions.
4 changes: 2 additions & 2 deletions __tests__/src/AXObjectElementMap-test.js
Expand Up @@ -24,7 +24,7 @@ const entriesList = [
["DetailsRole", [{"name": "details"}]],
["DialogRole", [{"name": "dialog"}]],
["DirectoryRole", [{"name": "dir"}]],
["DisclosureTriangleRole", [{"attributes": [{"name": "open", "value": "open"}], "constraints": ["scoped to a details element"], "name": "summary"}, {"attributes": [{"name": "aria-expanded"}], "constraints": ["scoped to a details element"], "name": "summary"}]],
["DisclosureTriangleRole", [{"constraints": ["scoped to a details element"], "name": "summary"}]],
["DivRole", [{"name": "div"}]],
["EmbeddedObjectRole", [{"name": "embed"}]],
["FigcaptionRole", [{"name": "figcaption"}]],
Expand Down Expand Up @@ -152,7 +152,7 @@ describe('AXObjectElementMap', function () {
expect(AXObjectElementMap.get("DetailsRole")).toEqual([{"name": "details"}]);
expect(AXObjectElementMap.get("DialogRole")).toEqual([{"name": "dialog"}]);
expect(AXObjectElementMap.get("DirectoryRole")).toEqual([{"name": "dir"}]);
expect(AXObjectElementMap.get("DisclosureTriangleRole")).toEqual([{"attributes": [{"name": "open", "value": "open"}], "constraints": ["scoped to a details element"], "name": "summary"}, {"attributes": [{"name": "aria-expanded"}], "constraints": ["scoped to a details element"], "name": "summary"}]);
expect(AXObjectElementMap.get("DisclosureTriangleRole")).toEqual([{"constraints": ["scoped to a details element"], "name": "summary"}]);
expect(AXObjectElementMap.get("DivRole")).toEqual([{"name": "div"}]);
expect(AXObjectElementMap.get("EmbeddedObjectRole")).toEqual([{"name": "embed"}]);
expect(AXObjectElementMap.get("FigcaptionRole")).toEqual([{"name": "figcaption"}]);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/src/AXObjectsMap-test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions __tests__/src/elementAXObjectMap-test.js
Expand Up @@ -24,8 +24,7 @@ const entriesList = [
[{"name": "details"}, ["DetailsRole"]],
[{"name": "dialog"}, ["DialogRole"]],
[{"name": "dir"}, ["DirectoryRole"]],
[{"attributes": [{"name": "open", "value": "open"}], "constraints": ["scoped to a details element"], "name": "summary"}, ["DisclosureTriangleRole"]],
[{"attributes": [{"name": "aria-expanded"}], "constraints": ["scoped to a details element"], "name": "summary"}, ["DisclosureTriangleRole"]],
[{"constraints": ["scoped to a details element"], "name": "summary"}, ["DisclosureTriangleRole"]],
[{"name": "div"}, ["DivRole"]],
[{"name": "embed"}, ["EmbeddedObjectRole"]],
[{"name": "figcaption"}, ["FigcaptionRole"]],
Expand Down Expand Up @@ -85,7 +84,7 @@ describe('elementAXObjectMap', function () {
expect(elementAXObjectMap[Symbol.iterator]).toBeDefined();
});
it('should have a specific length', function () {
expect([...elementAXObjectMap].length).toEqual(71);
expect([...elementAXObjectMap].length).toEqual(70);
});
describe('should support the spread operator', function () {
test.each([...elementAXObjectMap])(`Testing role: '%s' with element %o`, (role, elements) => {
Expand Down Expand Up @@ -167,8 +166,7 @@ describe('elementAXObjectMap', function () {
expect(elementAXObjectMap.get({"name": "details"})).toEqual(["DetailsRole"]);
expect(elementAXObjectMap.get({"name": "dialog"})).toEqual(["DialogRole"]);
expect(elementAXObjectMap.get({"name": "dir"})).toEqual(["DirectoryRole"]);
expect(elementAXObjectMap.get({"attributes": [{"name": "open", "value": "open"}], "name": "summary"})).toEqual(["DisclosureTriangleRole"]),
expect(elementAXObjectMap.get({"attributes": [{"name": "aria-expanded"}], "name": "summary"})).toEqual(["DisclosureTriangleRole"]),
expect(elementAXObjectMap.get({"constraints": ["scoped to a details element"], "name": "summary"})).toEqual(["DisclosureTriangleRole"]),
expect(elementAXObjectMap.get({"name": "div"})).toEqual(["DivRole"]);
expect(elementAXObjectMap.get({"name": "embed"})).toEqual(["EmbeddedObjectRole"]);
expect(elementAXObjectMap.get({"name": "figcaption"})).toEqual(["FigcaptionRole"]);
Expand Down
20 changes: 0 additions & 20 deletions scripts/axmodel.json
Expand Up @@ -390,26 +390,6 @@
{
"module": "HTML",
"concept": {
"attributes": [
{
"name": "open",
"value": "open"
}
],
"constraints": [
"scoped to a details element"
],
"name": "summary"
}
},
{
"module": "HTML",
"concept": {
"attributes": [
{
"name": "aria-expanded"
}
],
"constraints": [
"scoped to a details element"
],
Expand Down
20 changes: 0 additions & 20 deletions src/etc/objects/DisclosureTriangleRole.js
Expand Up @@ -6,26 +6,6 @@ const DisclosureTriangleRole: AXObjectModelDefinition = {
{
module: 'HTML',
concept: {
attributes: [
{
name: 'open',
value: 'open',
},
],
constraints: [
'scoped to a details element',
],
name: 'summary',
},
},
{
module: 'HTML',
concept: {
attributes: [
{
name: 'aria-expanded',
},
],
constraints: [
'scoped to a details element',
],
Expand Down

0 comments on commit 1955973

Please sign in to comment.