Skip to content

Commit

Permalink
@mmcc added type=button to button components. closes #2471
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcc committed Aug 13, 2015
1 parent 39ef157 commit 20b2a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

--------------------

Expand Down
5 changes: 3 additions & 2 deletions src/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 20b2a78

Please sign in to comment.