-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
15111c9
ARIA modules build correctly
jessebeach 38b5660
Transformed the roles.json to individual modules
jessebeach 6496221
Use the correct module names for the abstract and dpub roles rollup m…
jessebeach 5b0fa8f
Update flow-bin to 0.40.0
jessebeach 686a579
Move src/etc/aria to src/etc/roles
jessebeach 1e6483f
Remove the aria.json file and move the info into a module
jessebeach b0f7fd2
ariaMap to ariaPropsMap
jessebeach 5827bf7
Move aria.json to scripts
jessebeach 5d64681
Fix the breakUpAriaJson script
jessebeach 09124e2
Converted dom.json to domMap
jessebeach b9fe6c4
Fixed an unexpected token warning in domMap.js
jessebeach f73a500
Fix the failing Travis run by removing a glob expansion that it appar…
jessebeach f25dcbc
Found a stray uppercase aria prop value in the json.
jessebeach 5ba13f6
Conglomerate the role properties on each role definition
jessebeach 462091e
Narrow the Flow type definitions for ARIA
jessebeach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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([ | ||
['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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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([ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ariaLiteralRoles/ariaAbstractRoles