From 6889e925b4ec361f2cfcac1d9bf8feb66c1fc0ab Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 4 Nov 2016 14:18:30 -0400 Subject: [PATCH] refactor: remove un-needed contructor and function overrides (#3721) --- src/js/big-play-button.js | 4 ---- src/js/button.js | 4 ---- src/js/clickable-component.js | 20 -------------------- 3 files changed, 28 deletions(-) diff --git a/src/js/big-play-button.js b/src/js/big-play-button.js index 71de8b20b..b581d33b2 100644 --- a/src/js/big-play-button.js +++ b/src/js/big-play-button.js @@ -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 * diff --git a/src/js/button.js b/src/js/button.js index e5af4c8a7..7dae7baec 100644 --- a/src/js/button.js +++ b/src/js/button.js @@ -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 * diff --git a/src/js/clickable-component.js b/src/js/clickable-component.js index fb3c51686..41e3ef37e 100644 --- a/src/js/clickable-component.js +++ b/src/js/clickable-component.js @@ -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 *