Skip to content

Commit dccf920

Browse files
author
alexbaum
committed
Add to ignore aria- generated attrs
1 parent d4d9598 commit dccf920

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ The options wiil be predefined:
229229

230230
```js
231231
{
232-
ignoreAttributes: ['id', 'for'],
232+
ignoreAttributes: ['id', 'for', 'aria-labelledby', 'aria-describedby'],
233233
compareAttributesAsJSON: [
234234
'data-bem',
235235
{ name: 'onclick', isFunction: true },

README.ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ var HtmlDiffer = require('html-differ').HtmlDiffer,
229229

230230
```js
231231
{
232-
ignoreAttributes: ['id', 'for'],
232+
ignoreAttributes: ['id', 'for', 'aria-labelledby', 'aria-describedby'],
233233
compareAttributesAsJSON: [
234234
'data-bem',
235235
{ name: 'onclick', isFunction: true },

lib/utils/defaults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ var _ = require('lodash');
1515
if (typeof options === 'string') {
1616
if (options === 'bem') {
1717
options = {
18-
ignoreAttributes: ['id', 'for'],
18+
// ignore generated attributes
19+
ignoreAttributes: ['id', 'for', 'aria-labelledby', 'aria-describedby'],
1920
compareAttributesAsJSON: [
2021
'data-bem',
2122
{ name: 'onclick', isFunction: true },

0 commit comments

Comments
 (0)