Action link role sets to button
if no HREF is given
This commit is contained in:
parent
73af7178a5
commit
112d540df4
1 changed files with 8 additions and 2 deletions
|
@ -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…
Reference in a new issue