Adds `role="presentation"` to accordion items to comply with WAI. Includes the respective unit test.
fix #11659
this.$element.attr('role', 'tablist');
this.$tabs = this.$element.children('[data-accordion-item]');
+
+ this.$tabs.attr({'role': 'presentation'});
this.$tabs.each(function(idx, el) {
var $el = $(el),
plugin.$element.should.be.an('object');
plugin.options.should.be.an('object');
});
+
+ it('applies role="presentation" to the list item to conform with WAI', function () {
+ $html = $(template).appendTo('body');
+ plugin = new Foundation.Accordion($html, {allowAllClosed: true});
+
+ $html.find('.accordion-item').eq(0).should.have.attr('role', 'presentation');
+ });
});
describe('up()', function(done) {