1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-15 01:34:23 +02:00

@mmcc added type=button to button components. closes #2471

This commit is contained in:
Matthew McClure
2015-08-13 13:43:57 -07:00
parent 39ef157994
commit 20b2a78287
2 changed files with 4 additions and 2 deletions

View File

@ -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)) * @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)) * @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)) * @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))
-------------------- --------------------

View File

@ -37,16 +37,17 @@ class Button extends Component {
* @return {Element} * @return {Element}
* @method createEl * @method createEl
*/ */
createEl(type='button', props={}) { createEl(tag='button', props={}) {
// Add standard Aria and Tabindex info // Add standard Aria and Tabindex info
props = assign({ props = assign({
className: this.buildCSSClass(), className: this.buildCSSClass(),
'role': 'button', '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 'aria-live': 'polite', // let the screen reader user know that the text of the button may change
tabIndex: 0 tabIndex: 0
}, props); }, props);
let el = super.createEl(type, props); let el = super.createEl(tag, props);
this.controlTextEl_ = Dom.createEl('span', { this.controlTextEl_ = Dom.createEl('span', {
className: 'vjs-control-text' className: 'vjs-control-text'