• Resolved jmiha

    (@jmiha)


    Hello! I was delighted to see “Improvement: Add alt text to images on quiz answers” in the recent changelog, but as far as I can tell, it’s not working because neither quiz answer images nor the result image have alt tags. Do I have to create a new quiz for this functionality? I cleared the cache after the update and still nothing.

    I believe alt text would be fairly trivial to add, since I add it by modifying the front-action and front-render files after every update with three lines of code, so the functionality is 99% there already. Please consider prioritizing it for increased accessibility.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jmiha

    (@jmiha)

    Okay, after some more digging, I see that the following change was made on line 469 in front-render: Changeset?2921804?for?forminator/trunk/library/modules/quizzes/front/front-render.php

    That same change also needs to be made on line 335 in that file.

    And in front-action, starting on line 332, I made two changes, marked by //jmiha fix comments:

    <?php if ( isset( $result['image'] ) && ! empty( $result['image'] ) ) { ?>
    							
        <?php
            //jmiha fix 
            $image_alt   = isset( $result['image_alt'] ) ? $result['image_alt'] : ''; 
        ?>
        
        <div class="forminator-result--image" style="background-image: url('<?php echo esc_html( $result['image'] ); ?>');" aria-hidden="true">
            <img src="<?php echo esc_url( $result['image'] ); ?>" alt="<?php echo esc_attr( $image_alt); //jmiha fix ?>"/>
        </div>
    <?php } ?>

    This same change probably also needs to be made elsewhere in the file for quizzes that have right answers, since this is the fix for the personality-type quiz that I’m using.

    Please let me know if you have any questions. I would LOVE to see these changes implemented so I don’t have to keep doing them manually. ??

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @jmiha

    I hope you’re well today!

    Thank you for reporting this!

    There was a fix included in 1.24 release indeed but I just checked it and you are right – it only did partial fix (as under the same bug there was issue with featured image of the quiz).

    I just tested it and I can confirm it so I have already reported it to our Forminator Team to look into it and give it another go to fix it fully.

    Kind regards,
    Adam

    Thread Starter jmiha

    (@jmiha)

    Thank you! Looking forward to the fix. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alt Text Still Not Working’ is closed to new replies.