Coder Social home page Coder Social logo

andarist / aria-practices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from w3c/aria-practices

0.0 1.0 0.0 19.56 MB

WAI-ARIA Authoring Practices

Home Page: https://w3c.github.io/aria-practices/

License: Other

HTML 47.90% JavaScript 50.96% CSS 0.74% XSLT 0.26% Shell 0.13%

aria-practices's Introduction

Build Status Greenkeeper badge

WAI-ARIA: Authoring Practices Guide

This repository maintains the WAI-ARIA Authoring Practices Guide.

Please do not provide commit access to this repository without coordination.

How the work is organized

  • Work is planned and prioritized in our milestones. Each milestone corresponds to a working draft or release published to w3.org.
  • Work is organized by topic in our projects. Each project corresponds to a type of design pattern or section of guidance.
  • The scope of work and roadmap are described in the project wiki.

Contributing

  1. Comment in an existing issue or raise a new issue, expressing your willingness to help and briefly summarizing the nature of your proposed resolution.
  2. An editor will confirm there are no conflicting plans and, if needed, provide guidance.
  3. Be sure you have ESLint configured as described below.
  4. Read our wiki page about submitting pull requests.
  5. Do some fabulous work and submit a pull request.

Note: Please feel free to ask questions either through an issue or on the Authoring Practices Task Force mailing list.

Code conformance

This repository utilizes linting tools to do static code analysis and ensure consistent code quality across HTML, CSS, and JavaScript. Each linting tool and respective code standards are documented below and in the code guide.

Pull requests that contain linting errors will not be merged until the errors are resolved. To make this easier, you can install and run the tools locally before pushing code. Also note that the tools for CSS and JavaScript will automatically fix many issues if you have them installed locally. To install these tools:

  1. Make sure that you have Node.js installed, which comes with node package manager (npm)
  2. Open the directory that contains your aria-practices repository in a terminal
  3. Run npm install

The HTML validator also requires the installation of a JDK in order to run. If you don't already have a JDK installed, download the latest JDK from Oracle.

It is also highly recommended that you use a code editor that supports these tools and EditorConfig.

HTML

HTML is validated against the NU HTML Validator. Should a warning or error occur because a future ARIA feature is not yet implemented, it will be added to the the .vnurc file, allowing the error to pass through.

Run locally:

npm run lint:html

CSS

CSS is validated by stylelint using the stylelint-config-standard ruleset.

NOTE: on commit, stylelint will be run on staged CSS files. If errors are found that can be automatically fixed with the --fix flag, they will be fixed and the changes committed.

Run locally:

npm run lint:css

JavaScript

JavaScript is validated by ESLint, using our own config.

NOTE: on commit, eslint will be run on staged CSS files. If errors are found that can be automatically fixed with the --fix flag, they will be fixed and the changes committed.

Run locally:

npm run lint:js

Test and fix your code

  1. Open a terminal window to the directory that contains the aria-practices repository
  2. The repository has a script defined that will test all JavaScript in the examples directory. To run it, execute the command npm test. Note: this may take a few minutes to run and will open several browser windows during the test that will gain focus.
  3. Many errors can be fixed automatically with the command npm run fix.
  4. 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, review the .eslint.json file in the root of the project.

Editorial documentation

General documentation for editing ARIA deliverables is available in the ARIA repository. Some of that documentation covers technical procedures not needed for this specification.

How to update document snapshot

Note: These instructions are for editors of the APG who have repository commit access.

  1. Go to the editors draft on rawgit
  2. Press the ReSpec button (top right hand corner)
  3. Select 'Save snapshot'
  4. Select 'Save as HTML'
  5. Open the gh-pages branch of the aria-practices repository
  6. Open index.html in your preferred editor
  7. Overwrite contents of index.html with the snapshot copy you saved
  8. Commit and push changes
  9. Review changes at GitHub pages APG snapshot

aria-practices's People

Contributors

a11ydoer avatar aristov avatar backwardok avatar carmacleod avatar danielmatthew avatar dependabot[bot] avatar falkendk avatar geppy avatar gerardkcohen avatar greenkeeper[bot] avatar halindrome avatar jessebeach avatar jnurthen avatar jongund avatar kleinfreund avatar klown avatar mcking65 avatar nschonni avatar patrickhlauke avatar plehegar avatar pudgereyem avatar sh0ji avatar smhigley avatar spectranaut avatar tatermelon avatar thomascorthals avatar tripu avatar vishalnarkhede avatar zcorpan avatar zoebijl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.