Skip to content

Commit

Permalink
refactor: remove un-needed contructor and function overrides (#3721)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey authored and gkatsev committed Nov 4, 2016
1 parent b2c5b2a commit 6889e92
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
4 changes: 0 additions & 4 deletions src/js/big-play-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import Component from './component.js';
*/
class BigPlayButton extends Button {

constructor(player, options) {
super(player, options);
}

/**
* Allow sub components to stack CSS class names
*
Expand Down
4 changes: 0 additions & 4 deletions src/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import assign from 'object.assign';
*/
class Button extends ClickableComponent {

constructor(player, options) {
super(player, options);
}

/**
* Create the component's DOM element
*
Expand Down
20 changes: 0 additions & 20 deletions src/js/clickable-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,6 @@ class ClickableComponent extends Component {
return `vjs-control vjs-button ${super.buildCSSClass()}`;
}

/**
* Adds a child component inside this clickable-component
*
* @param {String|Component} child The class name or instance of a child to add
* @param {Object=} options Options, including options to be passed to children of the child.
* @return {Component} The child component (created by this process if a string was used)
* @method addChild
*/
addChild(child, options = {}) {
// TODO: Fix adding an actionable child to a ClickableComponent; currently
// it will cause issues with assistive technology (e.g. screen readers)
// which support ARIA, since an element with role="button" cannot have
// actionable child elements.

// let className = this.constructor.name;
// log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role="button" cannot have actionable child elements.`);

return super.addChild(child, options);
}

/**
* Enable the component element
*
Expand Down

0 comments on commit 6889e92

Please sign in to comment.