Skip to content
Snippets Groups Projects
Commit 112d540d authored by kushalpandya's avatar kushalpandya Committed by Jarka Kadlecova
Browse files

Action link role sets to `button` if no HREF is given

parent 73af7178
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -45,11 +45,17 @@ window.Flash = (function() {
textDiv.appendTo(flash);
 
if (actionConfig) {
actionLink = $('<a/>', {
const actionLinkConfig = {
class: 'flash-action',
href: actionConfig.href || '#',
text: actionConfig.title
});
};
if (!actionConfig.href) {
actionLinkConfig.role = 'button';
}
actionLink = $('<a/>', actionLinkConfig);
 
actionLink.appendTo(flash);
this.flashContainer.on('click', '.flash-action', actionConfig.clickHandler);
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment