File tree Expand file tree Collapse file tree
templates/frontend/inputs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,8 +148,22 @@ class="<?php echo esc_attr( $input_class ); ?>"
148148
149149
150150 <span class="ppom-input-option-label ppom-label-checkbox"><?php echo $ option_label ; ?>
151- <?php if ( $ is_tooltip_enabled && ! empty ( $ option_tooltip ) ) : ?>
152- <span data-ppom-tooltip="ppom_tooltip" class="ppom-tooltip" title="<?php echo esc_attr ( $ option_tooltip ); ?> "><span class="ppom-tooltip-icon" style="background-color:<?php echo esc_attr ( $ icon_color ); ?> ;"></span></span>
151+ <?php
152+ if ( $ is_tooltip_enabled && ! empty ( $ option_tooltip ) ) :
153+ $ tooltip_description_id = esc_attr ( $ dom_id . '-tooltip-description ' );
154+ ?>
155+ <span
156+ data-ppom-tooltip="ppom_tooltip"
157+ class="ppom-tooltip"
158+ title="<?php echo esc_attr ( $ option_tooltip ); ?> "
159+ tabindex="0"
160+ role="button"
161+ aria-label="<?php echo wp_strip_all_tags ( $ raw_label ); ?> "
162+ aria-describedby="<?php echo $ tooltip_description_id ; ?> "
163+ >
164+ <span class="ppom-tooltip-icon" style="background-color:<?php echo esc_attr ( $ icon_color ); ?> ;"></span>
165+ </span>
166+ <span id="<?php echo $ tooltip_description_id ; ?> " class="screen-reader-text"><?php echo esc_html ( $ option_tooltip ); ?> </span>
153167 <?php endif ; ?>
154168 </span>
155169 </label>
You can’t perform that action at this time.
0 commit comments