Showing with 19 additions and 6 deletions.
  1. +0 −5 js/jquery.mobile.buttonMarkup.js
  2. +19 −1 js/jquery.mobile.links.js
@@ -59,11 +59,6 @@ $.fn.buttonMarkup = function( options ) {
}
}

if ( getAttrFixed( e, nsKey + "rel" ) === "popup" && el.attr( "href" ) ) {
e.setAttribute( "aria-haspopup", true );
e.setAttribute( "aria-owns", el.attr( "href" ) );
}

// Check if this element is already enhanced
buttonElements = $.data( ( ( e.tagName === "INPUT" || e.tagName === "BUTTON" ) ? e.parentNode : e ), "buttonElements" );

@@ -4,7 +4,7 @@
//>>group: Utilities


define( [ "jquery" ], function( jQuery ) {
define( [ "jquery", "jquery.mobile.core" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

@@ -14,6 +14,24 @@ $( document ).bind( "pagecreate create", function( e ) {
$( e.target )
.find( "a" )
.jqmEnhanceable()
.filter( ":jqmData(rel='popup')[href][href!='']" )
.each( function() {
// Accessibility info for popups
var e = this,
href = $( this ).attr( "href" );

e.setAttribute( "aria-haspopup", true );
e.setAttribute( "aria-owns", href );
e.setAttribute( "aria-expanded", false );
$( document )
.on( "popupafteropen", href, function() {
e.setAttribute( "aria-expanded", true );
})
.on( "popupafterclose", href, function() {
e.setAttribute( "aria-expanded", false );
});
})
.end()
.not( ".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')" )
.addClass( "ui-link" );