Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Remove scrolling="no" from Media Player #2280

Merged
merged 20 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/psammead-media-player/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 1.1.1-alpha.3 | [PR#2280](https://github.com/bbc/psammead/pull/2280) Remove `scrolling="no"` for a11y best practice |
| 1.1.1-alpha.2 | [PR#2247](https://github.com/bbc/psammead/pull/2247) Update article embed URLs in MediaPLayer stories |
| 1.1.1-alpha.1 | [PR#2191](https://github.com/bbc/psammead/pull/2191) Talos - Bump Dependencies |
| 1.1.0-alpha.1 | [PR#2144](https://github.com/bbc/psammead/pull/2144) Add `skin` prop |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions packages/components/psammead-media-player/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"name": "@bbc/psammead-media-player",
"version": "1.1.1-alpha.2",
"publishConfig": {
"tag": "alpha"
},
"version": "1.1.1-alpha.3",
"description": "Provides a media player with optional placeholder",
"main": "dist/index.js",
"module": "esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('Media Player: Amp', () => {
<Amp
placeholderSrc="https://foo.bar/placeholder.png"
src="https://foo.bar/iframe"
title="An iframe"
pjlee11 marked this conversation as resolved.
Show resolved Hide resolved
/>,
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ exports[`Media Player: Canonical should render an iframe 1`] = `
allow="autoplay; fullscreen"
allowfullscreen=""
class="c0"
scrolling="no"
src="https://foo.bar/iframe"
/>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const StyledIframe = styled.iframe`
const Canonical = ({ src }) => (
<StyledIframe
src={src}
scrolling="no"
allow="autoplay; fullscreen"
gesture="media"
allowFullScreen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import Canonical from '.';
describe('Media Player: Canonical', () => {
shouldMatchSnapshot(
'should render an iframe',
<Canonical src="https://foo.bar/iframe" />,
<Canonical src="https://foo.bar/iframe" title="An iframe" />,
pjlee11 marked this conversation as resolved.
Show resolved Hide resolved
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ exports[`Media Player: Canonical Entry renders an iframe when showPlaceholder is
allow="autoplay; fullscreen"
allowfullscreen=""
class="c1"
scrolling="no"
src="http://foo.bar/iframe"
/>
</div>
Expand Down Expand Up @@ -244,7 +243,6 @@ exports[`Media Player: Canonical Entry renders the audio skin 1`] = `
allow="autoplay; fullscreen"
allowfullscreen=""
class="c1"
scrolling="no"
src="https://www.test.bbc.com/ws/av-embeds/media/bbc_korean_radio/liveradio"
/>
</div>
Expand Down
13 changes: 12 additions & 1 deletion packages/components/psammead-media-player/src/index.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,26 @@ storiesOf('Components|Media Player', module)
.add('AMP', () => (
<AmpMediaPlayer
isAmp
src="https://www.test.bbc.co.uk/ws/av-embeds/articles/c3wmq4d1y3wo/p01k6msp"
src="https://www.test.bbc.co.uk/ws/av-embeds/articles/c3wmq4d1y3wo/p01k6msp/amp"
Copy link
Contributor Author

@pjlee11 pjlee11 Oct 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug, might as well fix here

placeholderSrc="https://ichef.bbci.co.uk/news/640/cpsdevpb/4eb7/test/ba7482d0-cca8-11e8-b0bf-f33155223fc4.jpg"
/>
));

storiesOf('Components|Media Player', module).add('Audio Skin', () => (
<CanonicalMediaPlayer
src="https://www.test.bbc.com/ws/av-embeds/media/bbc_korean_radio/liveradio"
title="Audio - Live Korean Radio"
pjlee11 marked this conversation as resolved.
Show resolved Hide resolved
showPlaceholder={false}
skin="audio"
/>
));

storiesOf('Components|Media Player', module)
.addDecorator(ampDecorator)
.add('AMP Audio skin', () => (
<AmpMediaPlayer
simonsinclair marked this conversation as resolved.
Show resolved Hide resolved
isAmp
src="https://www.test.bbc.com/ws/av-embeds/media/bbc_korean_radio/liveradio/amp"
placeholderSrc="https://news.files.bbci.co.uk/include/articles/public/images/audio-player-placeholder.png"
simonsinclair marked this conversation as resolved.
Show resolved Hide resolved
/>
));
7 changes: 7 additions & 0 deletions packages/components/psammead-media-player/src/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('Media Player: AMP Entry', () => {
<AmpMediaPlayer
placeholderSrc="http://foo.bar/placeholder.png"
src="http://foo.bar/iframe/amp"
title="An iframe"
/>,
);

Expand All @@ -17,6 +18,7 @@ describe('Media Player: AMP Entry', () => {
portrait
placeholderSrc="http://foo.bar/placeholder.png"
src="http://foo.bar/iframe/amp"
title="An iframe"
/>,
);

Expand All @@ -25,6 +27,7 @@ describe('Media Player: AMP Entry', () => {
<AmpMediaPlayer
showPlaceholder={false}
src="https://www.test.bbc.com/ws/av-embeds/media/bbc_korean_radio/liveradio"
title="An iframe"
skin="audio"
/>,
);
Expand All @@ -36,6 +39,7 @@ describe('Media Player: Canonical Entry', () => {
<CanonicalMediaPlayer
placeholderSrc="http://foo.bar/placeholder.png"
src="http://foo.bar/iframe"
title="An iframe"
/>,
);

Expand All @@ -44,6 +48,7 @@ describe('Media Player: Canonical Entry', () => {
<CanonicalMediaPlayer
placeholderSrc="http://foo.bar/placeholder.png"
src="http://foo.bar/iframe"
title="An iframe"
portrait
/>,
);
Expand All @@ -53,6 +58,7 @@ describe('Media Player: Canonical Entry', () => {
<CanonicalMediaPlayer
showPlaceholder={false}
src="http://foo.bar/iframe"
title="An iframe"
/>,
);

Expand All @@ -61,6 +67,7 @@ describe('Media Player: Canonical Entry', () => {
<CanonicalMediaPlayer
showPlaceholder={false}
src="https://www.test.bbc.com/ws/av-embeds/media/bbc_korean_radio/liveradio"
title="An iframe"
skin="audio"
/>,
);
Expand Down