Skip to content

Accessibility warning #121

Closed
Closed

Description

@bsylwek

Hello
Users report a problem with a warning in the accessibility of the page in connection with downloading attachments. This is very important for people with disabilities. I have attached a screenshot showing it. I managed to locate that this is a problem in the Attachements template in the localization

components/com_attachments/tmpl/attachments/default.php

this code?

$a_class = 'at_icon'; $show_link = "<a class=\"". $a_class . "\" href=\"$url\"$target title=\"$tooltip\" alt=\"$tooltip\">"; $show_link .= HTMLHelper::image('com_attachments/file_icons/'.$icon, $tooltip, null, true); }

Image

How can I solve this problem?

Activity

  1. JLTRY commented on Apr 18, 2025

    @JLTRY
    Collaborator

    @bsylwek what do you want as alt text depending on the attachment file ? can you give an example ?

  2. bsylwek commented on Apr 18, 2025

    @bsylwek
    Author

    If I understand correctly, this accessibility warning should be described in the alt and or title, to which page it directs? I think it is the attachment page defined in the alt and or title field? Problem only concerns the icon of a file, e.g. pdf.gif. People with disabilities pay attention to this on their content readers. I'm wondering how to solve this problem. Do you have an idea?

  3. JLTRY commented on Apr 18, 2025

    @JLTRY
    Collaborator

    do you have the url of the screenshot, so that I can check the accessibility
    do you use a specific tool to check the accessibility ?

  4. bsylwek commented on Apr 18, 2025

    @bsylwek
    Author

    Yes, please scroll bottom and click on the right, a round icon of human accessibility and show settings all to ON and this warning will be displayed
    https://www.bip.dps2.vernet.pl/dostep-do-informacji-niezamieszczonej-w-bip

  5. parapente commented on Apr 18, 2025

    @parapente
    Collaborator

    @bsylwek the accessibility tools always show warnings for such things as they are unable to check that what is written in the alt text is true for the picture or the link. They show those warnings so that a human checks the validity of the text that appears in alt or title. That is why it is a warning and not an error.

    However I am not an accessibility expert so if you think that something else should appear in the alt description we can have a look at it.

  6. bsylwek commented on Apr 18, 2025

    @bsylwek
    Author

    See I removed this line of code and everything is fine.

    $show_link = "<a class=\"". $a_class . "\" href=\"$url\"$target title=\"$tooltip\" alt=\"$tooltip\">";

    Image

    `

  7. parapente commented on Apr 18, 2025

    @parapente
    Collaborator

    Yes but now if you happen to click on the icon the file will not download. You basically removed the link that was the reason for the warning. That does not make it the right thing to do.

  8. bsylwek commented on Apr 18, 2025

    @bsylwek
    Author

    I'm wondering how to solve this differently. I can't find instructions anywhere on how to make the link next to the icon and not get an error.

  9. JLTRY commented on Apr 18, 2025

    @JLTRY
    Collaborator

    @bsylwek Could you share the name of the tool used to check the accessibility ?

  10. bsylwek commented on Apr 18, 2025

    @bsylwek
    Author
  11. parapente commented on Apr 18, 2025

    @parapente
    Collaborator

    That is a different error: "Ensure touch target have sufficient size and space" and it is actually wrong as the icon is not the only target for downloading the file. Also if you want you can improve the icon or link size by using some css in your template adding more padding to the anchor.

  12. added a commit that references this issue on Apr 19, 2025
  13. JLTRY commented on Apr 19, 2025

    @JLTRY
    Collaborator
  14. bsylwek commented on Apr 19, 2025

    @bsylwek
    Author

    I noticed you did a component update? I guess that didn't change anything. I updated.

    I replaced this

    $show_link .= HTMLHelper::image('com_attachments/file_icons/'.$icon, $tooltip, null, true);

    to this

    $show_link .= HTMLHelper::image('com_attachments/file_icons/'.$icon, null, null, true);

    do I delete this code?

    $html .= "</a>"; if ( !$show_in_modal ) { $html .= "<a class=\"at_url\" href=\"$url\"$target title=\"$tooltip\">$filename</a>"; }

  15. JLTRY commented on Apr 19, 2025

    @JLTRY
    Collaborator

    @bsylwek no component update a source update that should be checked
    Here is the raw format of the updated file
    https://raw.githubusercontent.com/JLTRY/attachments/refs/heads/master/attachments_component/site/tmpl/attachments/default.php

  16. bsylwek commented on Apr 19, 2025

    @bsylwek
    Author

    I uploaded it. It works for me! I'll check it with different accessibility validators. Thank you.

  17. added a commit that references this issue on Apr 20, 2025
  18. JLTRY commented on Apr 29, 2025

    @JLTRY
    Collaborator

    please open an other issue if more changes are needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions