Popup: reverse orientation bug has been fixed
[platform/framework/web/web-ui-fw.git] / libs / patch / 0032-JQM-Support-accessibility-for-button.patch
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
5
6 ---
7  .../js/jquery.mobile.buttonMarkup.js               |    9 +++++++
8  1 file changed, 9 insertions(+)
9
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" ) );
16                 }
17  
18 +               if ( e.tagName !== "LI" && e.tagName !== "LABEL" ) {
19 +                       e.setAttribute( "role", "button" );
20 +                       e.setAttribute( "tabindex", "0" );
21 +               }
22 +
23                 // Check if this element is already enhanced
24                 buttonElements = $.data( ( ( e.tagName === "INPUT" || e.tagName === "BUTTON" ) ? e.parentNode : e ), "buttonElements" );
25  
26 @@ -131,6 +136,10 @@ $.fn.buttonMarkup = function( options ) {
27  
28                                 buttonClass += " ui-btn-icon_only";
29                                 innerClass += " ui-btn-icon-only";
30 +
31 +                               if ( e.tagName !== "LABEL" ) {
32 +                                       $( el ).text( o.icon.replace( "naviframe-", "" ) );
33 +                               }
34                         }
35                 } else {
36                         if ( $(el).text().length > 0 ) {
37 -- 
38 1.7.9.5
39