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

Shipping Icon #107

Open
brianteeman opened this issue Nov 17, 2024 · 0 comments
Open

Shipping Icon #107

brianteeman opened this issue Nov 17, 2024 · 0 comments

Comments

@brianteeman
Copy link

brianteeman commented Nov 17, 2024

As you can see in the screenshot below the same icon is used for both shipping enabled and shipping disabled. The only difference is the colour being red or green. As 8% of the male population cannot differentiate between red and green colours this is clearly not accessible.

image

Protanopia

image

Deuteranopia

image

Golden rule is to always have two visual clues.

I would suggest changing the shipping enabled icon to something like fa-truck

image

Screen Reader

Additionally for users of screen readers it is also non accessible as there is no non-image representation of the image. So for those users they have no clue if it is shippable or not.

I would suggest the following solution

<?php echo (isset($variant->shipping) && ($variant->shipping)) ? '<span class="fa-solid fa-truck text-success aria-hidden="true"></span><span class="visually-hidden">' . Text::_('J2STORE_PRODUCT_SHIPPING_ENABLED_YES') . '</span>' : '<span class="fa-solid fa-box text-danger" aria-hidden="true"></span><span class="visually-hidden">' . Text::_('J2STORE_PRODUCT_SHIPPING_ENABLED_NO') . '</span>'; ?>

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

No branches or pull requests

1 participant