1 From 79d7d678ec75404aa8a927ec337d8563ed26e9fc Mon Sep 17 00:00:00 2001
2 From: Wonseop Kim <wonseop.kim@samsung.com>
3 Date: Sat, 16 Mar 2013 17:26:01 +0900
4 Subject: [PATCH] JQM: Support accessibility for button
7 .../js/jquery.mobile.buttonMarkup.js | 9 +++++++
8 1 file changed, 9 insertions(+)
10 diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js
11 index 7c17ba6..cd8e39d 100644
12 --- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js
13 +++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js
14 @@ -52,6 +52,11 @@ $.fn.buttonMarkup = function( options ) {
15 e.setAttribute( "aria-owns", e.getAttribute( "href" ) );
18 + if ( e.tagName !== "LI" && e.tagName !== "LABEL" ) {
19 + e.setAttribute( "role", "button" );
20 + e.setAttribute( "tabindex", "0" );
23 // Check if this element is already enhanced
24 buttonElements = $.data( ( ( e.tagName === "INPUT" || e.tagName === "BUTTON" ) ? e.parentNode : e ), "buttonElements" );
26 @@ -131,6 +136,10 @@ $.fn.buttonMarkup = function( options ) {
28 buttonClass += " ui-btn-icon_only";
29 innerClass += " ui-btn-icon-only";
31 + if ( e.tagName !== "LABEL" ) {
32 + $( el ).text( o.icon.replace( "naviframe-", "" ) );
36 if ( $(el).text().length > 0 ) {