Skip to content

Improved a11y for ps-emailsubscription templates#432

Merged
kpodemski merged 2 commits intoPrestaShop:developfrom
nicosomb:improve-a11y-ps-emailsubscription
Feb 17, 2023
Merged

Improved a11y for ps-emailsubscription templates#432
kpodemski merged 2 commits intoPrestaShop:developfrom
nicosomb:improve-a11y-ps-emailsubscription

Conversation

@nicosomb
Copy link
Contributor

@nicosomb nicosomb commented Jan 12, 2023

Questions Answers
Description? id was missing for aria-labelledby.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? ~
How to test? ~
Possible impacts? ~

Related to #251.

I also added a required attribute in modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription-column.tpl because I think it was forgotten.

0x346e3730
0x346e3730 previously approved these changes Jan 13, 2023
@@ -20,6 +20,7 @@
value="{$value}"
placeholder="{l s='Your email address' d='Shop.Forms.Labels'}"
aria-labelledby="block-newsletter-label"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
aria-labelledby="block-newsletter-label"
aria-labelledby="block-newsletter-label-{$hookName}"

<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>
Copy link
Contributor

Choose a reason for hiding this comment

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

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)

Copy link
Contributor

@Hlavtox Hlavtox left a comment

Choose a reason for hiding this comment

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

Next person can merge

Copy link
Contributor

@kpodemski kpodemski left a comment

Choose a reason for hiding this comment

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

$hookName is not available, you have to edit module and assign this variable to the view.

@nicosomb
Copy link
Contributor Author

I added hookName because you suggested it 😬

@nicosomb
Copy link
Contributor Author

@kpodemski
Capture d’écran 2023-02-17 à 15 09 51

Copy link
Contributor

@kpodemski kpodemski left a comment

Choose a reason for hiding this comment

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

Yes, in this module it is available. But that's not the case for every single module.

@nicosomb
Copy link
Contributor Author

@kpodemski you can merge :)

@kpodemski kpodemski added this to the Beta milestone Feb 17, 2023
@kpodemski kpodemski merged commit cc02c6d into PrestaShop:develop Feb 17, 2023
@nicosomb nicosomb deleted the improve-a11y-ps-emailsubscription branch February 17, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants