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

[5.3] Contact icons etc [a11y] #44523

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Conversation

brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Nov 25, 2024

Pull Request for Issue #37442 and more .

Summary of Changes

This pull request focuses on improving accessibility by ensuring that visually hidden text is properly included for screen readers. The changes primarily involve modifying how icons/images and their corresponding text are handled in the components/com_contact directory.

Accessibility Improvements:

  • There is no visible change with this PR
  • When using icons there is no change
  • When using images instead of icons it marks the images as decorative and correctly provides a definition term (dt) so that it ensures that screen readers can still access the necessary information without displaying it visually
  • When using "none" instead of icons it correctly provides a definition term (dt) so that it ensures that screen readers can still access the necessary information without displaying it visually

Bug Fix

  • Although the component options let you select an image instead of an icon there was no code to render it
  • The icons and the images used the same class so they could not be styled differently. This PR introduces a new css class for the images

Testing Instructions

  • Go to Global Configuration -> Component -> Contacts -> Icon panel
  • Set Settings drop-down list to Icons
  • Select any picture for the Icons
  • Create a contact, add every contact datas (name, address, email, etc.)
  • Display the created contact using any kind of template (preferable Cassiopeia) which doesn't use template override for the file "components/com_contact/tmpl/contact/default_address.php"
  • Check the alt text of the images of email
  • Check that there is a valid dt text

Actual result BEFORE applying this Pull Request

When using images the dt is only an image with an alt description. This is not a valid dt AND the text for contact was using the wrong language string value

Expected result AFTER applying this Pull Request

When using images or icons or any mix thereof all images are marked as decorative and icons are aria-hidden AND there is a valid dt for each element marked as screen reader only

image

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman brianteeman changed the title [5.3] Contact form icons etc [a11y] [5.3] Contact icons etc [a11y] Nov 25, 2024
Signed-off-by: BrianTeeman <[email protected]>
@Quy
Copy link
Contributor

Quy commented Nov 26, 2024

Address and Email don't have the colon.

44523-contact

@brianteeman
Copy link
Contributor Author

@Quy - should be fixed now

@Quy
Copy link
Contributor

Quy commented Nov 29, 2024

I have tested this item ✅ successfully on 5f9541b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44523.

1 similar comment
@fgsw
Copy link

fgsw commented Nov 30, 2024

I have tested this item ✅ successfully on 5f9541b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44523.

@Quy Quy removed the Feature label Nov 30, 2024
@Quy
Copy link
Contributor

Quy commented Nov 30, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44523.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 30, 2024
@Quy Quy added Feature a11y Accessibility labels Nov 30, 2024
@rdeutz rdeutz added this to the Joomla! 5.3.0 milestone Dec 3, 2024
@rdeutz rdeutz merged commit f871926 into joomla:5.3-dev Dec 3, 2024
4 checks passed
@rdeutz
Copy link
Contributor

rdeutz commented Dec 3, 2024

Thanks

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Dec 3, 2024
@brianteeman
Copy link
Contributor Author

Thanks

@brianteeman brianteeman deleted the contact_icon branch December 3, 2024 18:54
@QuyTon QuyTon mentioned this pull request Jan 28, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants