Improved a11y for ps-emailsubscription templates#432
Merged
kpodemski merged 2 commits intoPrestaShop:developfrom Feb 17, 2023
nicosomb:improve-a11y-ps-emailsubscription
Merged
Improved a11y for ps-emailsubscription templates#432kpodemski merged 2 commits intoPrestaShop:developfrom nicosomb:improve-a11y-ps-emailsubscription
kpodemski merged 2 commits intoPrestaShop:developfrom
nicosomb:improve-a11y-ps-emailsubscription
Conversation
0x346e3730
previously approved these changes
Jan 13, 2023
kpodemski
reviewed
Jan 13, 2023
| @@ -20,6 +20,7 @@ | |||
| value="{$value}" | |||
| placeholder="{l s='Your email address' d='Shop.Forms.Labels'}" | |||
| aria-labelledby="block-newsletter-label" | |||
Contributor
There was a problem hiding this comment.
Suggested change
| aria-labelledby="block-newsletter-label" | |
| aria-labelledby="block-newsletter-label-{$hookName}" |
kpodemski
reviewed
Jan 13, 2023
| <div class="{$componentName}__content row"> | ||
| <div class="{$componentName}__content__left col-md-5"> | ||
| <p class="{$componentName}__label">{l s='Get our latest news and special sales' d='Shop.Theme.Global'}</p> | ||
| <p id="block-newsletter-label" class="{$componentName}__label">{l s='Get our latest news and special sales' d='Shop.Theme.Global'}</p> |
Contributor
There was a problem hiding this comment.
Suggested change
| <p id="block-newsletter-label" class="{$componentName}__label">{l s='Get our latest news and special sales' d='Shop.Theme.Global'}</p> | |
| <p id="block-newsletter-label-{$hookName}" class="{$componentName}__label">{l s='Get our latest news and special sales' d='Shop.Theme.Global'}</p> |
to avoid having two same ids if there are two newsletters on the website
(for example: in the footer, and in the popup)
kpodemski
requested changes
Feb 17, 2023
Contributor
kpodemski
left a comment
There was a problem hiding this comment.
$hookName is not available, you have to edit module and assign this variable to the view.
Contributor
Author
|
I added |
Contributor
Author
kpodemski
approved these changes
Feb 17, 2023
Contributor
kpodemski
left a comment
There was a problem hiding this comment.
Yes, in this module it is available. But that's not the case for every single module.
Contributor
Author
|
@kpodemski you can merge :) |
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.

idwas missing foraria-labelledby.Related to #251.
I also added a
requiredattribute inmodules/ps_emailsubscription/views/templates/hook/ps_emailsubscription-column.tplbecause I think it was forgotten.