Add inline documentation to role attribute removal
This commit is contained in:
parent
f88d090396
commit
253679737b
|
@ -568,6 +568,9 @@ jQuery( function( $ ) {
|
||||||
// Add new errors
|
// Add new errors
|
||||||
if ( result.messages ) {
|
if ( result.messages ) {
|
||||||
var $msgs = $( result.messages )
|
var $msgs = $( result.messages )
|
||||||
|
// The error notice template (plugins/woocommerce/templates/notices/error.php)
|
||||||
|
// adds the role="alert" to a list HTML element. This becomes a problem in this context
|
||||||
|
// because screen readers won't read the list content correctly if its role is not "list".
|
||||||
.removeAttr( 'role' )
|
.removeAttr( 'role' )
|
||||||
.attr( 'tabindex', '-1' );
|
.attr( 'tabindex', '-1' );
|
||||||
var $msgsWithLink = wc_checkout_form.wrapMessagesInsideLink( $msgs );
|
var $msgsWithLink = wc_checkout_form.wrapMessagesInsideLink( $msgs );
|
||||||
|
|
Loading…
Reference in New Issue