From b75b3135f4c7409fb8b1dbe2ff9fe574d1c110c8 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 4 Jul 2013 11:29:47 +0200 Subject: [PATCH] Links: ID refs without hashtag for aria-owns attribute of links to popups. Fixes #6117. --- js/jquery.mobile.links.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.links.js b/js/jquery.mobile.links.js index c2dffd53b33..1c4ef6a097b 100644 --- a/js/jquery.mobile.links.js +++ b/js/jquery.mobile.links.js @@ -18,10 +18,11 @@ $( document ).bind( "pagecreate create", function( e ) { .each( function() { // Accessibility info for popups var e = this, - href = $( this ).attr( "href" ); + href = $( this ).attr( "href" ), + idref = href.substring( 1 ); e.setAttribute( "aria-haspopup", true ); - e.setAttribute( "aria-owns", href ); + e.setAttribute( "aria-owns", idref ); e.setAttribute( "aria-expanded", false ); $( document ) .on( "popupafteropen", href, function() {