Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/35860: Adds missing aria-label and tabindex HTML attributes to the Help tip element. #37808

Merged
merged 3 commits into from Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-35860
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

add missing aria-label attributes to help tips
Expand Up @@ -1091,8 +1091,12 @@ jQuery( function ( $ ) {

// Add a descriptive tooltip to the product description editor
$( '#wp-content-media-buttons' )
.append( '<span class="woocommerce-help-tip" tabindex="-1"></span>' )
.append( '<span class="woocommerce-help-tip" tabindex="0"></span>' )
.find( '.woocommerce-help-tip' )
.attr(
'tabindex',
'0'
)
.attr( 'for', 'content' )
.attr(
'aria-label',
Expand All @@ -1111,6 +1115,10 @@ jQuery( function ( $ ) {
$( '#postexcerpt > .postbox-header > .hndle' )
.append( '<span class="woocommerce-help-tip"></span>' )
.find( '.woocommerce-help-tip' )
.attr(
'tabindex',
'0'
)
.attr(
'aria-label',
woocommerce_admin_meta_boxes.i18n_product_short_description_tip
Expand Down
2 changes: 1 addition & 1 deletion plugins/woocommerce/includes/wc-core-functions.php
Expand Up @@ -1610,7 +1610,7 @@ function wc_help_tip( $tip, $allow_html = false ) {
*
* @return string
*/
return apply_filters( 'wc_help_tip', '<span class="woocommerce-help-tip" data-tip="' . $sanitized_tip . '"></span>', $sanitized_tip, $tip, $allow_html );
return apply_filters( 'wc_help_tip', '<span class="woocommerce-help-tip" tabindex="0" aria-label="' . $sanitized_tip . '" data-tip="' . $sanitized_tip . '"></span>', $sanitized_tip, $tip, $allow_html );
}

/**
Expand Down