1
0
mirror of https://github.com/videojs/video.js.git synced 2024-11-28 08:58:46 +02:00

@OwenEdwards improved handling of deprecated use of Button component. closes #3236

This commit is contained in:
Owen Edwards 2016-04-05 13:26:49 -04:00 committed by Gary Katsevman
parent 4849374f23
commit 0f40f3f155
2 changed files with 11 additions and 1 deletions

View File

@ -2,7 +2,7 @@ CHANGELOG
=========
## HEAD (Unreleased)
_(none)_
* @OwenEdwards improved handling of deprecated use of Button component ([view](https://github.com/videojs/video.js/pull/3236))
--------------------

View File

@ -39,6 +39,16 @@ class Button extends ClickableComponent {
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