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

Model aria better #2

Merged
merged 15 commits into from
Mar 11, 2017
Merged
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
12 changes: 0 additions & 12 deletions __tests__/src/ariaMap-test.js

This file was deleted.

12 changes: 12 additions & 0 deletions __tests__/src/ariaPropsMaps-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-env mocha */
import expect from 'expect';
import ariaPropsMap from '../../src/ariaPropsMap';

describe('ariaPropsMap', function () {
it('should be a Map', function () {
expect(ariaPropsMap).toBeA(Map);
});
it('should have size', function () {
expect(ariaPropsMap.size).toBeGreaterThan(0);
});
});
29 changes: 29 additions & 0 deletions ariaAbstractRoles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import commandRole from './abstract/commandRole';
import compositeRole from './abstract/compositeRole';
import inputRole from './abstract/inputRole';
import landmarkRole from './abstract/landmarkRole';
import rangeRole from './abstract/rangeRole';
import roletypeRole from './abstract/roletypeRole';
import sectionRole from './abstract/sectionRole';
import sectionheadRole from './abstract/sectionheadRole';
import selectRole from './abstract/selectRole';
import structureRole from './abstract/structureRole';
import widgetRole from './abstract/widgetRole';
import windowRole from './abstract/windowRole';

const ariaLiteralRoles = new Map([
Copy link

@beefancohen beefancohen Mar 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ariaLiteralRoles/ariaAbstractRoles

['command', commandRole],
['composite', compositeRole],
['input', inputRole],
['landmark', landmarkRole],
['range', rangeRole],
['roletype', roletypeRole],
['section', sectionRole],
['sectionhead', sectionheadRole],
['select', selectRole],
['structure', structureRole],
['widget', widgetRole],
['window', windowRole]
]);

export default ariaLiteralRoles;
83 changes: 83 additions & 0 deletions ariaDpubRoles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import docAbstractRole from './dpub/docAbstractRole';
import docAcknowledgmentsRole from './dpub/docAcknowledgmentsRole';
import docAfterwordRole from './dpub/docAfterwordRole';
import docAppendixRole from './dpub/docAppendixRole';
import docBacklinkRole from './dpub/docBacklinkRole';
import docBiblioentryRole from './dpub/docBiblioentryRole';
import docBibliographyRole from './dpub/docBibliographyRole';
import docBibliorefRole from './dpub/docBibliorefRole';
import docChapterRole from './dpub/docChapterRole';
import docColophonRole from './dpub/docColophonRole';
import docConclusionRole from './dpub/docConclusionRole';
import docCoverRole from './dpub/docCoverRole';
import docCreditRole from './dpub/docCreditRole';
import docCreditsRole from './dpub/docCreditsRole';
import docDedicationRole from './dpub/docDedicationRole';
import docEndnoteRole from './dpub/docEndnoteRole';
import docEndnotesRole from './dpub/docEndnotesRole';
import docEpigraphRole from './dpub/docEpigraphRole';
import docEpilogueRole from './dpub/docEpilogueRole';
import docErrataRole from './dpub/docErrataRole';
import docExampleRole from './dpub/docExampleRole';
import docFootnoteRole from './dpub/docFootnoteRole';
import docForewordRole from './dpub/docForewordRole';
import docGlossaryRole from './dpub/docGlossaryRole';
import docGlossrefRole from './dpub/docGlossrefRole';
import docIndexRole from './dpub/docIndexRole';
import docIntroductionRole from './dpub/docIntroductionRole';
import docNoterefRole from './dpub/docNoterefRole';
import docNoticeRole from './dpub/docNoticeRole';
import docPagebreakRole from './dpub/docPagebreakRole';
import docPagelistRole from './dpub/docPagelistRole';
import docPartRole from './dpub/docPartRole';
import docPrefaceRole from './dpub/docPrefaceRole';
import docPrologueRole from './dpub/docPrologueRole';
import docPullquoteRole from './dpub/docPullquoteRole';
import docQnaRole from './dpub/docQnaRole';
import docSubtitleRole from './dpub/docSubtitleRole';
import docTipRole from './dpub/docTipRole';
import docTocRole from './dpub/docTocRole';

const ariaLiteralRoles = new Map([

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ariaLiteralRoles/ariaDpubRoles

['doc-abstract', docAbstractRole],
['doc-acknowledgments', docAcknowledgmentsRole],
['doc-afterword', docAfterwordRole],
['doc-appendix', docAppendixRole],
['doc-backlink', docBacklinkRole],
['doc-biblioentry', docBiblioentryRole],
['doc-bibliography', docBibliographyRole],
['doc-biblioref', docBibliorefRole],
['doc-chapter', docChapterRole],
['doc-colophon', docColophonRole],
['doc-conclusion', docConclusionRole],
['doc-cover', docCoverRole],
['doc-credit', docCreditRole],
['doc-credits', docCreditsRole],
['doc-dedication', docDedicationRole],
['doc-endnote', docEndnoteRole],
['doc-endnotes', docEndnotesRole],
['doc-epigraph', docEpigraphRole],
['doc-epilogue', docEpilogueRole],
['doc-errata', docErrataRole],
['doc-example', docExampleRole],
['doc-footnote', docFootnoteRole],
['doc-foreword', docForewordRole],
['doc-glossary', docGlossaryRole],
['doc-glossref', docGlossrefRole],
['doc-index', docIndexRole],
['doc-introduction', docIntroductionRole],
['doc-noteref', docNoterefRole],
['doc-notice', docNoticeRole],
['doc-pagebreak', docPagebreakRole],
['doc-pagelist', docPagelistRole],
['doc-part', docPartRole],
['doc-preface', docPrefaceRole],
['doc-prologue', docPrologueRole],
['doc-pullquote', docPullquoteRole],
['doc-qna', docQnaRole],
['doc-subtitle', docSubtitleRole],
['doc-tip', docTipRole],
['doc-toc', docTocRole]
]);

export default ariaLiteralRoles;
143 changes: 143 additions & 0 deletions ariaLiteralRoles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import alertRole from './literal/alertRole';
import alertdialogRole from './literal/alertdialogRole';
import applicationRole from './literal/applicationRole';
import articleRole from './literal/articleRole';
import bannerRole from './literal/bannerRole';
import buttonRole from './literal/buttonRole';
import cellRole from './literal/cellRole';
import checkboxRole from './literal/checkboxRole';
import columnheaderRole from './literal/columnheaderRole';
import comboboxRole from './literal/comboboxRole';
import complementaryRole from './literal/complementaryRole';
import contentinfoRole from './literal/contentinfoRole';
import definitionRole from './literal/definitionRole';
import dialogRole from './literal/dialogRole';
import directoryRole from './literal/directoryRole';
import documentRole from './literal/documentRole';
import feedRole from './literal/feedRole';
import figureRole from './literal/figureRole';
import formRole from './literal/formRole';
import gridRole from './literal/gridRole';
import gridcellRole from './literal/gridcellRole';
import groupRole from './literal/groupRole';
import headingRole from './literal/headingRole';
import imgRole from './literal/imgRole';
import linkRole from './literal/linkRole';
import listRole from './literal/listRole';
import listboxRole from './literal/listboxRole';
import listitemRole from './literal/listitemRole';
import logRole from './literal/logRole';
import mainRole from './literal/mainRole';
import marqueeRole from './literal/marqueeRole';
import mathRole from './literal/mathRole';
import menuRole from './literal/menuRole';
import menubarRole from './literal/menubarRole';
import menuitemRole from './literal/menuitemRole';
import menuitemcheckboxRole from './literal/menuitemcheckboxRole';
import menuitemradioRole from './literal/menuitemradioRole';
import navigationRole from './literal/navigationRole';
import noneRole from './literal/noneRole';
import noteRole from './literal/noteRole';
import optionRole from './literal/optionRole';
import presentationRole from './literal/presentationRole';
import progressbarRole from './literal/progressbarRole';
import radioRole from './literal/radioRole';
import radiogroupRole from './literal/radiogroupRole';
import regionRole from './literal/regionRole';
import rowRole from './literal/rowRole';
import rowgroupRole from './literal/rowgroupRole';
import rowheaderRole from './literal/rowheaderRole';
import scrollbarRole from './literal/scrollbarRole';
import searchRole from './literal/searchRole';
import searchboxRole from './literal/searchboxRole';
import separatorRole from './literal/separatorRole';
import sliderRole from './literal/sliderRole';
import spinbuttonRole from './literal/spinbuttonRole';
import statusRole from './literal/statusRole';
import switchRole from './literal/switchRole';
import tabRole from './literal/tabRole';
import tableRole from './literal/tableRole';
import tablistRole from './literal/tablistRole';
import tabpanelRole from './literal/tabpanelRole';
import termRole from './literal/termRole';
import textboxRole from './literal/textboxRole';
import timerRole from './literal/timerRole';
import toolbarRole from './literal/toolbarRole';
import tooltipRole from './literal/tooltipRole';
import treeRole from './literal/treeRole';
import treegridRole from './literal/treegridRole';
import treeitemRole from './literal/treeitemRole';

const ariaLiteralRoles = new Map([
['alert', alertRole],
['alertdialog', alertdialogRole],
['application', applicationRole],
['article', articleRole],
['banner', bannerRole],
['button', buttonRole],
['cell', cellRole],
['checkbox', checkboxRole],
['columnheader', columnheaderRole],
['combobox', comboboxRole],
['complementary', complementaryRole],
['contentinfo', contentinfoRole],
['definition', definitionRole],
['dialog', dialogRole],
['directory', directoryRole],
['document', documentRole],
['feed', feedRole],
['figure', figureRole],
['form', formRole],
['grid', gridRole],
['gridcell', gridcellRole],
['group', groupRole],
['heading', headingRole],
['img', imgRole],
['link', linkRole],
['list', listRole],
['listbox', listboxRole],
['listitem', listitemRole],
['log', logRole],
['main', mainRole],
['marquee', marqueeRole],
['math', mathRole],
['menu', menuRole],
['menubar', menubarRole],
['menuitem', menuitemRole],
['menuitemcheckbox', menuitemcheckboxRole],
['menuitemradio', menuitemradioRole],
['navigation', navigationRole],
['none', noneRole],
['note', noteRole],
['option', optionRole],
['presentation', presentationRole],
['progressbar', progressbarRole],
['radio', radioRole],
['radiogroup', radiogroupRole],
['region', regionRole],
['row', rowRole],
['rowgroup', rowgroupRole],
['rowheader', rowheaderRole],
['scrollbar', scrollbarRole],
['search', searchRole],
['searchbox', searchboxRole],
['separator', separatorRole],
['slider', sliderRole],
['spinbutton', spinbuttonRole],
['status', statusRole],
['switch', switchRole],
['tab', tabRole],
['table', tableRole],
['tablist', tablistRole],
['tabpanel', tabpanelRole],
['term', termRole],
['textbox', textboxRole],
['timer', timerRole],
['toolbar', toolbarRole],
['tooltip', tooltipRole],
['tree', treeRole],
['treegrid', treegridRole],
['treeitem', treeitemRole]
]);

export default ariaLiteralRoles;
Loading