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:
parent
4849374f23
commit
0f40f3f155
@ -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))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user