From 20b2a782870e544a22a6b66b51b235a6f28c1c27 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Thu, 13 Aug 2015 13:43:57 -0700 Subject: [PATCH] @mmcc added type=button to button components. closes #2471 --- CHANGELOG.md | 1 + src/js/button.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9a38c228e..765d091618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ CHANGELOG * @dmlap switched global options back to an object at videojs.options ([view](https://github.com/videojs/video.js/pull/2461)) * @ogun fixed a typo in the Turkish translation ([view](https://github.com/videojs/video.js/pull/2460)) * @gkatsev fixed text track errors on dispose and in cross-browser testing ([view](https://github.com/videojs/video.js/pull/2466)) +* @mmcc added type=button to button components ([view](https://github.com/videojs/video.js/pull/2471)) -------------------- diff --git a/src/js/button.js b/src/js/button.js index 7ac6efb594..31c08f9424 100644 --- a/src/js/button.js +++ b/src/js/button.js @@ -37,16 +37,17 @@ class Button extends Component { * @return {Element} * @method createEl */ - createEl(type='button', props={}) { + createEl(tag='button', props={}) { // Add standard Aria and Tabindex info props = assign({ className: this.buildCSSClass(), 'role': 'button', + 'type': 'button', // Necessary since the default button type is "submit" 'aria-live': 'polite', // let the screen reader user know that the text of the button may change tabIndex: 0 }, props); - let el = super.createEl(type, props); + let el = super.createEl(tag, props); this.controlTextEl_ = Dom.createEl('span', { className: 'vjs-control-text'