diff options
author | Thomas Lindner <tclindner@gmail.com> | 2016-01-28 06:29:39 +0300 |
---|---|---|
committer | Chris Rebert <code@chrisrebert.com> | 2016-01-29 05:32:36 +0300 |
commit | 398d76fa055e79f0d7ae360360a217e1601adc97 (patch) | |
tree | 5710f99c223ef0004d3873ab8d1e35c5a69b9f1c /src | |
parent | 84fd014127e6f777fb0d48c3849ab6b5d21334e3 (diff) |
Add new lint E048 to check that modals have role="dialog" attributes; fixes #318
Closes #348
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 9ee1d76..b35c28e 100644 --- a/src/bootlint.js +++ b/src/bootlint.js @@ -1082,6 +1082,12 @@ var LocationIndex = _location.LocationIndex; reporter('`.btn` should only be used on `<a>`, `<button>`, `<input>`, or `<label>` elements.', btns); } }); + addLinter("E048", function lintModalRole($, reporter) { + var modals = $('.modal:not([role="dialog"])'); + if (modals.length) { + reporter('`.modal` must have a `role="dialog"` attribute.', modals); + } + }); exports._lint = function ($, reporter, disabledIdList, html) { var locationIndex = IN_NODE_JS ? new LocationIndex(html) : null; var reporterWrapper = IN_NODE_JS ? function (problem) { |