2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-23 09:54:28 -06:00

Add ARIA attribute to button

This commit is contained in:
Jonathan 2022-05-22 00:17:53 +02:00 committed by GitHub
parent 611aa50443
commit cd9bbe7939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,6 +250,10 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
} }
} }
if (options.title) {
el.setAttribute('aria-label', options.title);
}
if (options.noDisable) { if (options.noDisable) {
el.classList.add('no-disable'); el.classList.add('no-disable');
} }