diff --git a/src/js/button.js b/src/js/button.js index f4ec5685d5..45aa87a05d 100644 --- a/src/js/button.js +++ b/src/js/button.js @@ -16,8 +16,9 @@ class Button extends ClickableComponent { /** * Create the `Button`s DOM element. * - * @param {string} [tag=button] - * Element's node type. e.g. 'button' + * @param {string} [tag="button"] + * The element's node type. This argument is IGNORED: no matter what + * is passed, it will always create a `button` element. * * @param {Object} [props={}] * An object of properties that should be set on the element. @@ -28,25 +29,13 @@ class Button extends ClickableComponent { * @return {Element} * The element that gets created. */ - createEl(tag = 'button', props = {}, attributes = {}) { + createEl(tag, props = {}, attributes = {}) { + tag = 'button'; + props = assign({ className: this.buildCSSClass() }, props); - if (tag !== 'button') { - log.warn(`Creating a Button with an HTML element of ${tag} is deprecated; use ClickableComponent instead.`); - - // Add properties for clickable element which is not a native HTML button - props = assign({ - tabIndex: 0 - }, props); - - // Add ARIA attributes for clickable element which is not a native HTML button - attributes = assign({ - role: 'button' - }, attributes); - } - // Add attributes for button element attributes = assign({