The correct value for `aria-haspopup` for dialog controlling
elements is "dialog", not "true" which indicates a menu element.
See: https://www.w3.org/TR/wai-aria-1.1/#dialog
this.$anchor = $(`[data-open="${this.id}"]`).length ? $(`[data-open="${this.id}"]`) : $(`[data-toggle="${this.id}"]`);
this.$anchor.attr({
'aria-controls': this.id,
- 'aria-haspopup': true,
+ 'aria-haspopup': 'dialog',
'tabindex': 0
});
var $anchor = $('<button data-open="exampleModal1">Open</button>').appendTo('body');
plugin = new Foundation.Reveal($html, {});
- $anchor.should.have.attr('aria-haspopup', 'true');
+ $anchor.should.have.attr('aria-haspopup', 'dialog');
$anchor.should.have.attr('aria-controls', $html.attr('id'));
$anchor.remove();