Skip to content
This repository was archived by the owner on Nov 26, 2021. It is now read-only.

Commit

Permalink
delete playButtonTextEl (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenglish authored and notlee committed Mar 26, 2018
1 parent c0922f5 commit 6c4501a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
6 changes: 1 addition & 5 deletions src/js/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,9 @@ class Video {
const playButtonEl = document.createElement('button');
playButtonEl.className = 'o-video__play-button';

const playButtonTextEl = document.createElement('span');
playButtonTextEl.className = 'o-video__play-button-text';
playButtonTextEl.textContent = 'Play video';
playButtonEl.appendChild(playButtonTextEl);

const playButtonIconEl = document.createElement('span');
playButtonIconEl.className = 'o-video__play-button-icon';
playButtonIconEl.setAttribute('aria-label', 'Play video');
playButtonIconEl.textContent = this.opts.placeholderHint;
playButtonEl.appendChild(playButtonIconEl);

Expand Down
10 changes: 0 additions & 10 deletions src/scss/_placeholder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@
cursor: pointer;
}

.o-video__play-button-text {
position: absolute;
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
color: oColorsGetPaletteColor('white');
}

.o-video__play-button-icon {
@include oIconsBaseStyles;
@include oIconsGetIcon('play', oColorsGetPaletteColor('white'), $apply-base-styles: false, $apply-width-height: false, $iconset-version: 1);
Expand Down
2 changes: 0 additions & 2 deletions test/video.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,9 @@ describe('Video', () => {
video.addPlaceholder();

const playButtonEl = video.placeholderEl.querySelector('.o-video__play-button');
const playButtonTextEl = playButtonEl.querySelector('.o-video__play-button-text');
const playIconEl = playButtonEl.querySelector('.o-video__play-button-icon');

proclaim.ok(playButtonEl);
proclaim.ok(playButtonTextEl);
proclaim.ok(playIconEl);
proclaim.deepEqual(addEventListenerSpy.called, true);
proclaim.deepEqual(addEventListenerSpy.calledWith('click'), true);
Expand Down

0 comments on commit 6c4501a

Please sign in to comment.