Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amp-sidebar: optional attribute to change text for screen-reader clos… #9958

Merged
merged 33 commits into from Jun 24, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2cc99bc
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 16, 2017
8564790
revert packagge.json
rhapsodyai Jun 21, 2017
5748c3e
revert src/service/platform-impl.js
rhapsodyai Jun 21, 2017
12e9e34
revert yarn.lock to previous commit
rhapsodyai Jun 21, 2017
3eb5802
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
15f4d33
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
06fc212
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
5854b73
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
be63235
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
20e32a7
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
e3f7a4a
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
8b4d4b5
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
db2dc78
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
b53ff75
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
465c67a
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
07e5d87
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
ee895b4
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 21, 2017
bb300da
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 22, 2017
230a483
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 22, 2017
aaae345
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 22, 2017
2f9fdac
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 22, 2017
7446b4d
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
c92a4bd
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
f296c69
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
0c21838
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
65f7886
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
c375d7f
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
4ac242a
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
91fe36b
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
28f6a2c
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
ec91297
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
d19031f
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
d99be68
amp-sidebar: optional attribute to change text for screen-reader clos…
rhapsodyai Jun 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions extensions/amp-sidebar/0.1/test/test-amp-sidebar.js
Expand Up @@ -68,6 +68,16 @@ describes.realWin('amp-sidebar 0.1 version', {
return {iframe, ampSidebar};
});
});

it('should replace text to screen reader \
button in data-close-button-aria-label', () => {
return getAmpSidebar().then(obj => {
if (options.closeText) {
Copy link
Contributor

Choose a reason for hiding this comment

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

These next 3 lines sill need to be moved inside getAmpSidebar.

Copy link
Contributor

Choose a reason for hiding this comment

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

this part needs to move to the getAmpSidebar() method. Then this test becomes:

getAmpSidebar({closeText: 'custom close label'}). then(...
...

expect(closeButton.textContent).to.equal( 'custom close label');

ampsetbar.setAttribute('data-close-button-aria-label', options.closeText);
};
expect(closeButton.textContent).to.equal(options.closeText);
});
});
}

beforeEach(() => {
Expand Down Expand Up @@ -129,16 +139,6 @@ describes.realWin('amp-sidebar 0.1 version', {
});
});

it('should replace text to screen reader \
button in data-close-button-aria-label', () => {
return getAmpSidebar().then(obj => {
if (options.closeText) {
ampsetbar.setAttribute('data-close-button-aria-label', options.closeText);
};
expect(closeButton.textContent).to.equal(options.closeText);
});
});

it('should open sidebar on button click', () => {
return getAmpSidebar().then(obj => {
const sidebarElement = obj.ampSidebar;
Expand Down
20 changes: 10 additions & 10 deletions extensions/amp-sidebar/1.0/test/test-amp-sidebar.js
Expand Up @@ -69,6 +69,16 @@
return {iframe, ampSidebar};
});
});

it('should replace text to screen reader \
button in data-close-button-aria-label', () => {
return getAmpSidebar().then(obj => {
if (options.closeText) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here.

ampsetbar.setAttribute('data-close-button-aria-label', options.closeText);
};
expect(closeButton.textContent).to.equal(options.closeText);
});
});
}

beforeEach(() => {
Expand Down Expand Up @@ -131,16 +141,6 @@
});
});

it('should replace text to screen reader \
button in data-close-button-aria-label', () => {
return getAmpSidebar().then(obj => {
if (options.closeText) {
ampsetbar.setAttribute('data-close-button-aria-label', options.closeText);
};
expect(closeButton.textContent).to.equal(options.closeText);
});
});

it('should open sidebar on button click', () => {
return getAmpSidebar().then(obj => {
const sidebarElement = obj.ampSidebar;
Expand Down