Skip to content

Commit

Permalink
Merge pull request #5 from bamadesigner/1.0.1
Browse files Browse the repository at this point in the history
Merging version 1.0.1
  • Loading branch information
bamadesigner committed Dec 12, 2017
2 parents c6b4c38 + a74b705 commit ac7bd5c
Show file tree
Hide file tree
Showing 10 changed files with 217 additions and 336 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
admin-edit-post.min.css
admin-options-page.min.css
/vendor/
node_modules
vendor
58 changes: 5 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,13 @@ Data shows 1 in 5 people have a disability. If your site is inaccessible, **you

The foundation for good accessibility is great markup which also means that good accessibility can improve your SEO.

## wA11y.org
## Accessibility Resources and Tools

[wA11y.org](https://wa11y.org) is a new community initiative to contribute to web accessibility by providing information, education, resources, and tools.
The WPCampus community has a [great list of accessibility resources and tools](https://wpcampus.org/resources/accessibility/) available on their website.

If you're interested in joining the wA11y.org community, and would like to contribute to its growth, please subscribe at [https://wa11y.org](https://wa11y.org).
This resource is open-source and WPCampus would love for you to contribute. [Visit the WPCampus Resources repo](https://github.com/wpcampus/wpcampus-resources) to learn how to contribute.


## A Few Basic Accessibility Principles

* All non-text content needs 
a text equivalent to help convey information to those with sensory disabilities.
* For example, images and videos need text equivalents to convey information and context to those who have trouble with vision and/or hearing.
* Color usage should have 
sufficient contrast and should not be used as the sole method for conveying information or direction.
* For example, if your website has directions in red, and a user cannot see red, then that direction is inaccessible.
* Links, or actions on your website, should always be signified with something other than simply a different color. For example, an underline is the most common trait.
* Pages should have
 proper heading structure 
in order to be readable without a stylesheet for those who do not navigate visually.
* All site functionality
 should be available 
using the keyboard 
for persons who do 
not use a mouse.
* Tab order is important.
* Adding ARIA attributes are helpful to provide screen reader users with more context and greater interactivity with content.
* Responsive web design is important to ensure your site can be viewed on assistive devices of various sizes.

For more information about accessibility, including official standards and checklists, [check out our resources](#other-accessibility-resources).
**WA11Y PRO TIP: Take advantage of in-browser testing tools, like [WAVE](http://wave.webaim.org/) and [HTML_CodeSniffer](http://squizlabs.github.io/HTML_CodeSniffer/), to evaluate WordPress theme demos before you purchase.**

## Tools Included In wA11y

Expand Down Expand Up @@ -77,40 +63,6 @@ Here is a list of the filters available for this plugin:
* Allows you to pass a boolean to define whether or not the WAVE tool should be loaded
* Passes 2 arguments: the default setting and the plugin's settings

## Other Accessibility Resources

There are a multitude of resources available to help you better understand and evaluate accessibility. Please feel free to recommend more to add to the list.

**WA11Y PRO TIP: Take advantage of in-browser testing tools, like [WAVE](http://wave.webaim.org/) and [HTML_CodeSniffer](http://squizlabs.github.io/HTML_CodeSniffer/), to evaluate WordPress theme demos before you purchase.**

### Web Accessibility Standards

#### WCAG 2.0 - Web Content
 Accessibility 
Guidelines

[WCAG](https://www.w3.org/WAI/intro/wcag) are part of a series of guidelines published by 
the [Web Accessibility Initiative (WAI)](https://www.w3.org/WAI/) of the [World Wide Web Consortium (W3C)](https://www.w3.org/), the main international standards organization for the Internet.

Current version was published in December 2008.

* [WCAG 2.0 Checklist](http://webaim.org/standards/wcag/checklist)

#### Section 508

[Section 508 Standards](https://www.section508.gov/) apply to electronic and 
information technology developed, procured, maintained, or used by federal agencies, including computer hardware and software, websites, phone systems, and copiers.

Standards were issued in 2000.

* [Section 508 Checklist](http://webaim.org/standards/508/checklist)

### Other Accessibility Tools

* [Color Contrast Checker](http://webaim.org/resources/contrastchecker)

### Articles About Accessibility

* [Which Tool Is Best?](http://webaim.org/articles/tools)
* [Web Accessibility Evaluation Tools](https://www.w3.org/WAI/ER/tools)
* [Getting Started With ARIA](http://a11yproject.com/posts/getting-started-aria)

## wA11y Development

If you would like to contribute to this plugin, it will require a few steps to get the code inititated and compiled on your local or testing environment.
Expand All @@ -123,4 +75,4 @@ If you would like to contribute to this plugin, it will require a few steps to g
2. Open the directory in the command line.
3. Run `npm install`
5. Run `gulp` to compile all of the assets
* You can also run `gulp watch` to watch your assets for changes/updates
* You can also run `gulp watch` to watch your assets for changes/updates
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "bamadesigner/wa11y",
"description": "A toolbox of resources to help you improve the accessibility of your WordPress website.",
"type": "wordpress-plugin",
"private": true,
"license": "GPL-2.0+",
"authors": [
{
"name": "Rachel Carden",
"name": "Rachel Cherry",
"email": "bamadesigner@gmail.com"
}
],
Expand All @@ -14,9 +14,6 @@
"wp-coding-standards/wpcs": "*"
},
"scripts": {
"post-install-cmd": [
"./vendor/bin/phpcs --config-set bin vendor/bin/phpcs",
"./vendor/bin/phpcs --config-set installed_paths ../../wp-coding-standards/wpcs"
]
"sniff": "vendor/bin/phpcs --runtime-set installed_paths vendor/wp-coding-standards/wpcs -p ./ --standard=WordPress-Core --report=full --extensions=php --ignore=*/vendor/*,*/node_modules/*"
}
}
135 changes: 70 additions & 65 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,89 @@
// Require all the things (that we need)
var autoprefixer = require('gulp-autoprefixer');
var clean_css = require('gulp-clean-css');
var gulp = require('gulp');
var phpcs = require('gulp-phpcs');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var sort = require('gulp-sort');
var uglify = require('gulp-uglify');
var watch = require('gulp-watch');
var wp_pot = require('gulp-wp-pot');
const autoprefixer = require('gulp-autoprefixer');
const cleanCSS = require('gulp-clean-css');
const gulp = require('gulp');
const mergeMediaQueries = require('gulp-merge-media-queries');
const notify = require('gulp-notify');
const rename = require('gulp-rename');
const sass = require('gulp-sass');
const shell = require('gulp-shell');
const sort = require('gulp-sort');
const wp_pot = require('gulp-wp-pot');

// Define the source paths for each file type
var src = {
scss: 'assets/scss/*',
php: ['**/*.php','!vendor/**','!node_modules/**']
// Define the source paths for each file type.
const src = {
php: ['**/*.php','!vendor/**','!node_modules/**'],
sass: ['assets/scss/**/*']
};

// Sass is pretty awesome, right?
// Define the destination paths for each file type.
const dest = {
sass: 'assets/css',
translate: 'languages'
};

// Take care of SASS.
gulp.task('sass', function() {
return gulp.src(src.scss)
.pipe(sass({
outputStyle: 'compressed'
})
.on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
return gulp.src(src.sass)
.pipe(sass({
outputStyle: 'expanded'
}).on('error', sass.logError))
.pipe(mergeMediaQueries())
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(cleanCSS({
compatibility: 'ie8'
}))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('assets/css'));
.pipe(gulp.dest(dest.sass))
.pipe(notify('wA11y SASS compiled'));
});

// Minify the JS
/*gulp.task('js', function() {
gulp.src(src.js)
.pipe(uglify({
mangle: false
}))
.pipe(rename({
suffix: '.min'
// "Sniff" our PHP.
gulp.task('php', function() {
// TODO: Clean up. Want to run command and show notify for sniff errors.
return gulp.src('wa11y.php', {read: false})
.pipe(shell(['composer sniff'], {
ignoreErrors: true,
verbose: false
}))
.pipe(gulp.dest('assets/js'))
});*/

// Create the .pot translation file
gulp.task('translate', function() {
gulp.src('**/*.php')
.pipe(sort())
.pipe(wp_pot( {
domain: 'wa11y',
destFile:'wa11y.pot',
package: 'wA11y',
bugReport: 'https://github.com/bamadesigner/wa11y/issues',
lastTranslator: 'Rachel Carden <bamadesigner@gmail.com>',
team: 'Rachel Carden <bamadesigner@gmail.com>',
headers: false
} ))
.pipe(gulp.dest('languages'));
.pipe(notify('wA11y PHP sniffed'), {
onLast: true,
emitError: true
});
});

// Check our PHP
gulp.task('phpcs', function() {
return gulp.src(src.php)
.pipe(phpcs({
standard: 'WordPress-Core'
// Create the .pot translation file.
gulp.task('translate', function() {
gulp.src(src.php)
.pipe(sort())
.pipe(wp_pot({
domain: 'wa11y',
destFile: 'wa11y.pot',
package: 'wA11y',
bugReport: 'https://github.com/bamadesigner/wa11y/issues',
lastTranslator: 'Rachel Cherry <bamadesigner@gmail.com>',
team: 'Rachel Cherry <bamadesigner@gmail.com>',
headers: false
}))
.pipe(phpcs.reporter('log'));
.pipe(gulp.dest(dest.translate))
.pipe(notify('wA11y translated'));
});

// I've got my eyes on you(r file changes)
gulp.task('watch', function() {
gulp.watch(src.scss, ['sass']);
gulp.watch(src.php, ['translate']);
gulp.watch(src.php, ['phpcs']);
});
// Test our files.
gulp.task('test',['php']);

// Let's test things out
gulp.task('test', ['phpcs']);
// Compile all the things.
gulp.task('compile',['sass']);

// I've got my eyes on you(r file changes).
gulp.task('watch',function() {
gulp.watch(src.sass,['sass']);
gulp.watch(src.php,['php','translate']);
});

// Let's get this party started
gulp.task('default', ['sass','translate','watch']);
// Let's get this party started.
gulp.task('default',['compile','test','translate']);
Loading

0 comments on commit ac7bd5c

Please sign in to comment.