diff --git a/plugins/removeTitle.js b/plugins/removeTitle.js new file mode 100644 index 00000000..3dd07f55 --- /dev/null +++ b/plugins/removeTitle.js @@ -0,0 +1,22 @@ +'use strict'; + +exports.type = 'perItem'; + +exports.active = false; + +/** + * Remove . + * Disabled by default cause it may be used for accessibility. + * + * https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title + * + * @param {Object} item current iteration item + * @return {Boolean} if false, item will be filtered out + * + * @author Igor Kalashnikov + */ +exports.fn = function(item) { + + return !item.isElem('title'); + +}; diff --git a/test/plugins/removeTitle.01.svg b/test/plugins/removeTitle.01.svg new file mode 100644 index 00000000..27b10ca0 --- /dev/null +++ b/test/plugins/removeTitle.01.svg @@ -0,0 +1,10 @@ +<svg xmlns="http://www.w3.org/2000/svg"> + <title>... + + + +@@@ + + + +