Skip to content

Commit

Permalink
feat(standards): add superclassRole to dpubRoles (#2606)
Browse files Browse the repository at this point in the history
  • Loading branch information
straker authored Oct 29, 2020
1 parent 0d5cfb1 commit 1b66930
Showing 1 changed file with 78 additions and 39 deletions.
117 changes: 78 additions & 39 deletions lib/standards/dpub-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@
const dpubRoles = {
'doc-abstract': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-acknowledgments': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-afterword': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-appendix': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-backlink': {
type: 'link',
allowedAttrs: ['aria-expanded'],
nameFromContent: true
nameFromContent: true,
superclassRole: ['link']
},
'doc-biblioentry': {
type: 'listitem',
Expand All @@ -29,45 +34,55 @@ const dpubRoles = {
'aria-level',
'aria-posinset',
'aria-setsize'
]
],
superclassRole: ['listitem']
},
'doc-bibliography': {
type: 'landmark',
requiredOwned: ['doc-biblioentry'],
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-biblioref': {
type: 'link',
allowedAttrs: ['aria-expanded'],
nameFromContent: true
nameFromContent: true,
superclassRole: ['link']
},
'doc-chapter': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-colophon': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-conclusion': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-cover': {
type: 'img',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['img']
},
'doc-credit': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-credits': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-dedication': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-endnote': {
type: 'listitem',
Expand All @@ -77,102 +92,126 @@ const dpubRoles = {
'aria-level',
'aria-posinset',
'aria-setsize'
]
],
superclassRole: ['listitem']
},
'doc-endnotes': {
type: 'landmark',
requiredOwned: ['doc-endnote'],
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-epigraph': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-epilogue': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-errata': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-example': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-footnote': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-foreword': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-glossary': {
type: 'landmark',
requiredOwned: ['definition', 'term'],
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-glossref': {
type: 'link',
allowedAttrs: ['aria-expanded'],
nameFromContent: true
nameFromContent: true,
superclassRole: ['link']
},
'doc-index': {
type: 'navigation',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['navigation']
},
'doc-introduction': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-noteref': {
type: 'link',
allowedAttrs: ['aria-expanded'],
nameFromContent: true
nameFromContent: true,
superclassRole: ['link']
},
'doc-notice': {
type: 'note',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['note']
},
'doc-pagebreak': {
type: 'separator',
allowedAttrs: ['aria-expanded', 'aria-orientation']
allowedAttrs: ['aria-expanded', 'aria-orientation'],
superclassRole: ['separator']
},
'doc-pagelist': {
type: 'navigation',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['navigation']
},
'doc-part': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-preface': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-prologue': {
type: 'landmark',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
'doc-pullquote': {
type: 'none'
type: 'none',
superclassRole: ['none']
},
'doc-qna': {
type: 'section',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['section']
},
'doc-subtitle': {
type: 'sectionhead',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['sectionhead']
},
'doc-tip': {
type: 'note',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['note']
},
'doc-toc': {
type: 'navigation',
allowedAttrs: ['aria-expanded']
allowedAttrs: ['aria-expanded'],
superclassRole: ['navigation']
}
};

Expand Down

0 comments on commit 1b66930

Please sign in to comment.