Skip to content

Commit

Permalink
Add to ignore aria- generated attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbaum committed Oct 8, 2014
1 parent d4d9598 commit dccf920
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -229,7 +229,7 @@ The options wiil be predefined:

```js
{
ignoreAttributes: ['id', 'for'],
ignoreAttributes: ['id', 'for', 'aria-labelledby', 'aria-describedby'],
compareAttributesAsJSON: [
'data-bem',
{ name: 'onclick', isFunction: true },
Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Expand Up @@ -229,7 +229,7 @@ var HtmlDiffer = require('html-differ').HtmlDiffer,

```js
{
ignoreAttributes: ['id', 'for'],
ignoreAttributes: ['id', 'for', 'aria-labelledby', 'aria-describedby'],
compareAttributesAsJSON: [
'data-bem',
{ name: 'onclick', isFunction: true },
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/defaults.js
Expand Up @@ -15,7 +15,8 @@ var _ = require('lodash');
if (typeof options === 'string') {
if (options === 'bem') {
options = {
ignoreAttributes: ['id', 'for'],
// ignore generated attributes
ignoreAttributes: ['id', 'for', 'aria-labelledby', 'aria-describedby'],
compareAttributesAsJSON: [
'data-bem',
{ name: 'onclick', isFunction: true },
Expand Down

0 comments on commit dccf920

Please sign in to comment.