This repository maintains the WAI-ARIA Authoring Practices Guide. This is developed by the ARIA Working Group. The staff contact is Michael Cooper. Please do not provide commit access to this repository without coordination.
- All HTML should validate in the NU HTML Validator. Exceptions to this rule are warnings and errors related to future ARIA features we need to implement.
- To keep code in this repository consistent; editors should use a text editor that supports EditorConfig.
-
Choose a pattern from the Design Patterns Status document that is missing a code example.
-
Via the command line, run:
$ bin/generate <name>
Where
<name>
is the dasherized name of the design pattern example. This creates a new example directory and file with the same name, based on a template. -
Edit the new html file with an example corresponding to the description in
aria-practices.html
ESLint is an automated code style checker. We use it to ensure common code styling practices in this repository. Pull requests with ESLint errors will not be merged.
- If you do not already have node.js installed, go to the node installer
- When you install Node, NPM is included.
- In a terminal window from the directory that contains the
aria-practices
repository, runnpm install
. A successful install will display a tree of installed packages.
- Open a terminal window to the directory that contains the
aria-practices
repository - The repository has a script defined that will test all JavaScript in the examples
directory. To run it, execute the command
npm test
. - Many errors can be fixed automatically with the command
npm run fix
. - After running fix, test again to see what you need to fix manually.
When the linter encounters errors, it will report them in the console. The error report will contain the file name and line number, and it will indicate the character or place in the line that raised the style violation. To fix an error, satisfy the change that the violation indicates.
For example, here is an error for an invalid variable name style. Variables must follow a camelCase convention.
/Users/user1/Documents/github/aria-practices/examples/slider/js/text-slider.js
19:8 error Identifier 'value_nodes' is not in camel case camelcase
The error occurred in examples/slider/js/text-slider.js
, on line 19 and the
offending character is indicated by the number 8
after the colon. Change the
variable value_nodes
to valueNodes
in your source file to eliminate this
error.
To see the complete list of style rules that are applied by ESLint, Check out the .eslint.json file in the root of the project.
General documentation for editing ARIA deliverables is available in the ARIA repository. Some of that documentation covers technical procedures not needed for this specification.
Note: These instructions are for editors of the APG who have repository commit access.
- Go to the editors draft on rawgit
- Press the ReSpec button (top right hand corner)
- Select 'Save snapshot'
- Select 'Save as HTML'
- Open the gh-pages branch of the
aria-practices
repository - Open
index.html
in your preferred editor - Overwrite contents of
index.html
with the snapshot copy you saved - Commit and push changes
- Review changes at GitHub pages APG snapshot