amp-consent uiConfig and captions documentation#26722
Merged
micajuine-ho merged 2 commits intoampproject:masterfrom Feb 11, 2020
Merged
amp-consent uiConfig and captions documentation#26722micajuine-ho merged 2 commits intoampproject:masterfrom
micajuine-ho merged 2 commits intoampproject:masterfrom
Conversation
9 tasks
zhouyx
approved these changes
Feb 11, 2020
Contributor
zhouyx
left a comment
There was a problem hiding this comment.
Left one comment, but not blocking. Looks good!
|
|
||
| #### captions | ||
|
|
||
| `captions` provides accessibility features for screen reader users for `<amp-consent>`. `captions` is an optional JSON an object that can contain the keys `consentPromptCaption` and `buttonActionCaption` which are both strings and will have default values 'User Consent Prompt' and 'Focus Prompt'. When an consent prompt in an iframe is loaded, the screen reader will read the `consentPromptCaption` and then the `buttonActionCaption`. The `consentPromptCaption` should act as a title for the consent prompt, while the `buttonActionCaption` should inform the user that they can interact with the iframe. |
Contributor
There was a problem hiding this comment.
Looks good. Do you want to put an example JSON instead?
"captions": {
"consentPromptCaption": "This is an example user consent prompt",
"buttonActionCaption": "This is an example message"
}
Might also worth mentioning that default value is provided, but one can customize or localize the message to fit their own use cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #26432