jsdialog: a11y: keyboard activation for menubutton

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I36fda0f5880549e521ea2480be8ca1552ded869a
This commit is contained in:
Szymon Kłos 2023-04-12 13:58:47 +02:00 committed by Szymon Kłos
parent 603f912d86
commit 4cbec23190

View file

@ -69,8 +69,9 @@ function _menubuttonControl (parentContainer, data, builder) {
builder.options.noLabelsForUnoButtons = noLabels;
} else if (data.text || data.image) {
var button = L.DomUtil.create('div', 'menubutton ' + builder.options.cssClass, parentContainer);
var button = L.DomUtil.create('button', 'menubutton ' + builder.options.cssClass, parentContainer);
button.id = data.id;
button.setAttribute('aria-haspopup', true);
if (data.image) {
var image = L.DomUtil.create('img', '', button);
image.src = data.image;