Replies: 5 comments 1 reply
-
Where exactly does this code snippet appear? Is this Blade/Laravel controllers? |
Beta Was this translation helpful? Give feedback.
-
This is inside of the .twig view file, I am using fractal and rendering an html partial and passing that responsive(image) through as a parameter.
…________________________________
From: ncla ***@***.***>
Sent: Tuesday, December 6, 2022 6:06:52 PM
To: spatie/statamic-responsive-images ***@***.***>
Cc: wilson639 ***@***.***>; Author ***@***.***>
Subject: Re: [spatie/statamic-responsive-images] Adding aria-hidden parameter (Discussion #185)
Basically, I want screen readers to ignore certain images on my site. Currently, I'm passing an image through to a html partial with:
image: reponsive(image)
Where exactly does this code snippet appear? Is this Blade/Laravel controllers?
—
Reply to this email directly, view it on GitHub<#185 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWQXSZNJ7WTXFX37MKRRKVDWL56DZANCNFSM6AAAAAASVYKZX4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have never used Twig/Fractcal, so it is unclear to me how are you initiating Responsive tag. However: You could try calling the responsive tag through Statamic::tag with respective parameters you need https://statamic.dev/blade#using-tags-with-blade You can also manually initiate Responsive tag, just have to get it right with params https://github.com/spatie/statamic-responsive-images/blob/main/src/Tags/ResponsiveTag.php |
Beta Was this translation helpful? Give feedback.
-
Thank you for the help, I am new to statamic but that sounds promising. I will get back to you after I am able to test.
…________________________________
From: ncla ***@***.***>
Sent: Tuesday, December 6, 2022 6:22:04 PM
To: spatie/statamic-responsive-images ***@***.***>
Cc: wilson639 ***@***.***>; Author ***@***.***>
Subject: Re: [spatie/statamic-responsive-images] Adding aria-hidden parameter (Discussion #185)
I have never used Twig/Fractcal, so it is unclear to me how are you initiating Responsive tag. However:
You could try calling the responsive tag through Statamic::tag https://statamic.dev/blade#using-tags-with-blade
You can also manually initiate Responsive tag, just have to get it right with params https://github.com/spatie/statamic-responsive-images/blob/main/src/Tags/ResponsiveTag.php
—
Reply to this email directly, view it on GitHub<#185 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWQXSZLXOTOY4KBQY6XXK23WL574ZANCNFSM6AAAAAASVYKZX4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello, sorry for the late response. Unfortunately, it looks like this would require a lot more time than we expected due to how the project was originally setup.
Is it possible to allow blank alt tags ‘alt=“”’ if there is no title provided in the statamic admin? Currently it falls back to the file name. Thanks.
…________________________________
From: Liam Wilson ***@***.***>
Sent: Tuesday, December 6, 2022 6:24:54 PM
To: spatie/statamic-responsive-images ***@***.***>; spatie/statamic-responsive-images ***@***.***>
Cc: Author ***@***.***>
Subject: Re: [spatie/statamic-responsive-images] Adding aria-hidden parameter (Discussion #185)
Thank you for the help, I am new to statamic but that sounds promising. I will get back to you after I am able to test.
________________________________
From: ncla ***@***.***>
Sent: Tuesday, December 6, 2022 6:22:04 PM
To: spatie/statamic-responsive-images ***@***.***>
Cc: wilson639 ***@***.***>; Author ***@***.***>
Subject: Re: [spatie/statamic-responsive-images] Adding aria-hidden parameter (Discussion #185)
I have never used Twig/Fractcal, so it is unclear to me how are you initiating Responsive tag. However:
You could try calling the responsive tag through Statamic::tag https://statamic.dev/blade#using-tags-with-blade
You can also manually initiate Responsive tag, just have to get it right with params https://github.com/spatie/statamic-responsive-images/blob/main/src/Tags/ResponsiveTag.php
—
Reply to this email directly, view it on GitHub<#185 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWQXSZLXOTOY4KBQY6XXK23WL574ZANCNFSM6AAAAAASVYKZX4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Basically, I want screen readers to ignore certain images on my site. Currently, I'm passing an image through to a html partial with:
image: reponsive(image)
and rendering with:
{{ image | raw }}
Which is why I believe I am unable to add HTML attributes as described in the docs (under "HTML Attributes").
{{ responsive:image_field alt="" class="my-class" }}
Ideally, I want to also pass through
hidden=true
which then appends thearia-hidden=true
parameter onto the html tag. Is this possible with the way my project is setup?Alternatively, is there a way for images without an alt text in the admin to not default back to the file name?
Beta Was this translation helpful? Give feedback.
All reactions