diff options
author | Phil Hughes <phil.hughes@yoma.co.uk> | 2015-10-01 16:29:37 +0300 |
---|---|---|
committer | Chris Rebert <code@chrisrebert.com> | 2015-11-16 08:40:15 +0300 |
commit | 9b783b9460393ca8f73d095b64e33e2bd7204870 (patch) | |
tree | b69c39311218b2b8bbc6ab9d59ae157ae6f4e42a /src | |
parent | 284c6c22f43683c44f854c25a1f6ddd64a6875f8 (diff) |
Show an error for modals without tabindex attributes
Fixes #290
Closes #314
Diffstat (limited to 'src')
-rw-r--r-- | src/bootlint.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootlint.js b/src/bootlint.js index a1ebf1c..5534033 100644 --- a/src/bootlint.js +++ b/src/bootlint.js @@ -940,6 +940,12 @@ var LocationIndex = _location.LocationIndex; reporter('`.img-responsive` should only be used on `<img>`s', imgResponsiveNotOnImg); } }); + addLinter("E046", function lintModalTabIndex($, reporter) { + var modalsWithoutTabindex = $('.modal:not([tabindex])'); + if (modalsWithoutTabindex.length) { + reporter('`.modal` elements must have a `tabindex` attribute.', modalsWithoutTabindex); + } + }); addLinter("W009", function lintEmptySpacerCols($, reporter) { var selector = COL_CLASSES.map(function (colClass) { return colClass + ':not(:last-child)'; |