Permalink
Browse files

Textinput: Add aria-hidden="true" to clear button and test correct ma…

…rkup

Closes gh-7647
  • Loading branch information...
gabrielschulhof committed Aug 29, 2014
1 parent 826ada0 commit 29f036404181c31dc77cab382cd17fb3b103135e
Showing with 4 additions and 2 deletions.
  1. +1 −1 js/widgets/forms/clearButton.js
  2. +3 −1 tests/unit/textinput/textinput_core.js
@@ -30,7 +30,7 @@ define( [
},
clearButton: function() {
return $( "<a href='#' tabindex='-1' " +
return $( "<a href='#' tabindex='-1' aria-hidden='true' " +
"class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all'>" +
"</a>" )
.attr( "title", this.options.clearBtnText )
@@ -97,7 +97,9 @@
});
test( "data-clear-btn adds clear button to text inputs", function() {
ok( $( '#text-input-clear-btn' ).next().is( 'a.ui-input-clear' ), "data-clear-btn adds clear button to text inputs" );
ok( $( '#text-input-clear-btn' ).next()
.is( 'a.ui-input-clear[tabindex="-1"][aria-hidden="true"]' ),
"correctly marked up clear button is present" );
});
test( "data-clear-btn does not add clear button to textarea", function() {

0 comments on commit 29f0364

Please sign in to comment.