Skip to content

Commit

Permalink
♿ Added accessibility name to play pause button (#30276)
Browse files Browse the repository at this point in the history
* Added accessibility name to play pause button

* Organized alphabetically

* Added default and better descriptions

* Updated next ID
  • Loading branch information
mszylkowski committed Sep 21, 2020
1 parent 7edbc9a commit 14db3d2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions extensions/amp-story/1.0/_locales/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ const strings = {
[LocalizedStringId.AMP_STORY_INTERACTIVE_QUIZ_ANSWER_CHOICE_D]: {
string: 'D',
},
[LocalizedStringId.AMP_STORY_PAUSE_BUTTON_LABEL]: {
string: 'Pause',
},
[LocalizedStringId.AMP_STORY_PLAY_BUTTON_LABEL]: {
string: 'Play',
},
[LocalizedStringId.AMP_STORY_SHARING_CLIPBOARD_FAILURE_TEXT]: {
string: ':(',
},
Expand Down
9 changes: 9 additions & 0 deletions extensions/amp-story/1.0/_locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ const strings = {
description:
'Label for the fourth answer choice from a multiple choice quiz (e.g. D in A/B/C/D)',
},
[LocalizedStringId.AMP_STORY_PAUSE_BUTTON_LABEL]: {
string: 'Pause story',
description:
'Label for a button that pauses the media content on the story',
},
[LocalizedStringId.AMP_STORY_PLAY_BUTTON_LABEL]: {
string: 'Play story',
description: 'Label for a button that plays the media content on the story',
},
[LocalizedStringId.AMP_STORY_SHARE_BUTTON_LABEL]: {
string: 'Share story',
description:
Expand Down
2 changes: 2 additions & 0 deletions extensions/amp-story/1.0/amp-story-system-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,14 @@ const TEMPLATE = {
attrs: dict({
'class': PAUSE_CLASS + ' i-amphtml-story-button',
}),
localizedLabelId: LocalizedStringId.AMP_STORY_PAUSE_BUTTON_LABEL,
},
{
tag: 'button',
attrs: dict({
'class': PLAY_CLASS + ' i-amphtml-story-button',
}),
localizedLabelId: LocalizedStringId.AMP_STORY_PLAY_BUTTON_LABEL,
},
],
},
Expand Down
4 changes: 3 additions & 1 deletion src/localized-strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {parseJson} from './json';
* - NOT be reused; to deprecate an ID, comment it out and prefix its key with
* the string "DEPRECATED_"
*
* Next ID: 84
* Next ID: 87
*
* @const @enum {string}
*/
Expand Down Expand Up @@ -59,6 +59,8 @@ export const LocalizedStringId = {
AMP_STORY_PAGINATION_BUTTON_PREVIOUS_PAGE_LABEL: '82',
AMP_STORY_PAGE_ERROR_VIDEO: '65',
AMP_STORY_PAGE_PLAY_VIDEO: '34',
AMP_STORY_PAUSE_BUTTON_LABEL: '85',
AMP_STORY_PLAY_BUTTON_LABEL: '86',
AMP_STORY_SHARE_BUTTON_LABEL: '69',
AMP_STORY_SHARING_CLIPBOARD_FAILURE_TEXT: '4',
AMP_STORY_SHARING_CLIPBOARD_SUCCESS_TEXT: '5',
Expand Down

0 comments on commit 14db3d2

Please sign in to comment.