-
AuthorPosts
-
March 29, 2021 at 6:25 pm #1291129
I need to remove the code for the “Previous” and “Next” feature/links, but can’t find the .php file where they are located. I found some older posts where users asked about modifying that code. ‘functions-enfold.php’ and ‘functions.php’ were referenced here, but I can’t find anything in either file. So I’m guessing that has changed in one of the newer versions of the theme. Thanks!
March 29, 2021 at 6:28 pm #1291130What do you like to modify?
functions-enfold.php lines 635ff
there ares some filters you can use to modify the output.March 29, 2021 at 6:31 pm #1291131I actually want to remove the code for those two links.
March 29, 2021 at 6:37 pm #1291132March 29, 2021 at 7:16 pm #1291137Thanks. I actually need to remove it completely from the code in order to meet accessibility requirements:
Avoid placing inactive elements in the focus order
Providing focus to non-active elements may give users of assistive technology the impression that the element is interactive and cause keyboard users to have to use extra keystrokes to navigate.Since they are not being used in the website, I need to remove them completely in order to address that. Which is why I’m trying to find the file they are in.
March 29, 2021 at 10:57 pm #1291176as said here allready: https://kriesi.at/support/topic/modify-previous-next-code/#post-1291130
functions-enfold.php lines 635ff
and as a pluggable function ( these are indicated by
if( ! function_exists('name' ){…
)
you have not to remove the parent-theme entry but you can insert an empty function in child-theme functions.php:function avia_post_nav( ){ }
but test yourself first: https://kriesi.at/support/topic/modify-previous-next-code/#post-1291132
The anchors of avia-post-nav are not in the DOM !
March 30, 2021 at 2:26 pm #1291363Thanks for the info/clarification. I tried adding the code you provided to the child functions.php, but the accessibility tool I am using to test the website is still picking up on the elements. Below is what I am looking to remove:
<a data-av_iconfont="entypo-fontello" data-av_icon="" aria-hidden="true" class="prev-slide" href="#prev">Previous</a> <a data-av_iconfont="entypo-fontello" data-av_icon="" aria-hidden="true" class="next-slide" href="#next">Next</a>
March 30, 2021 at 2:35 pm #1291366please show me a link to your site!
This is nothing concerning to avia-post-nav – and you misled me a bit with your hint to the functions-enfold.php.
markup:
so this must be a slider.
If it is a postslider the lines are in postslider.php lines 996ff/** * @since < 4.0 * @return string */ protected function slide_navigation_arrows() { $html = ''; $html .= "<div class='avia-slideshow-arrows avia-slideshow-controls'>"; $html .= "<a href='#prev' class='prev-slide' " . av_icon_string( 'prev_big' ) .'>' . __( 'Previous', 'avia_framework' ) . '</a>'; $html .= "<a href='#next' class='next-slide' " . av_icon_string( 'next_big' ) . '>' . __( 'Next', 'avia_framework' ) . '</a>'; $html .= '</div>'; return $html; }
March 30, 2021 at 6:44 pm #1291432Haha, yes you are right. Sorry about that. I saw the previous/next referenced in the code from the accessibility tool and had incorrectly assumed it was the feature for navigating between the posts. I guess that would explain why I couldn’t find that code in the ‘functions-enfold.php’ file. Thanks for pointing me in the right direction.
April 1, 2021 at 9:09 am #1291718Hi NicomIT,
Thanks for the update, did you get the code working then? Thanks @guenni007 for helping out :-)
Best regards,
RikardApril 1, 2021 at 7:19 pm #1291874Hi Rikard,
Can you confirm where to find the ‘postslider.php’ file in the theme? Below is the accessibility issue that I am trying to address:Avoid placing inactive elements in the focus order
Elements on the page that are not interactive (those that do not trigger an action) such as labels, headings, etc. should not be in the keyboard focus order. Providing focus to non-active elements may give users of assistive technology the impression that the element is interactive and cause keyboard users to have to use extra keystrokes to navigate. In some specific situations (such as dire warnings or disabled controls that require changes for them to become enabled) it may be acceptable and necessary to place a limited number of non-interactive elements in the focus order. Setting focus programmatically to certain content that is not interactive such as error messages may also be acceptable.April 5, 2021 at 3:32 am #1292397Hi,
Thank you for the update.
The file is located in the enfold/config-templatebuilder/avia-shortcodes/postslider folder, look for the slide_navigation_arrows around line 996 as suggested by @Guenni007 above.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.