Page MenuHomePhabricator
Authored By
bzimport
Nov 21 2014, 10:35 PM
Size
1 KB
Referenced Files
None
Subscribers
None
Index: resources/mediawiki.util/mediawiki.util.js
===================================================================
--- resources/mediawiki.util/mediawiki.util.js (revision 87009)
+++ resources/mediawiki.util/mediawiki.util.js (working copy)
@@ -107,6 +107,9 @@
$tocToggleLink.click();
}
}
+
+ /* Apply WAI-ARIA accessibility roles */
+ mw.util.applyWaiAria();
} );
return true;
@@ -574,8 +577,19 @@
'[0-9A-Fa-f]{1,4}' + '(?:::?' + '[0-9A-Fa-f]{1,4}' + '){1,6}';
return address.search( new RegExp( '^' + RE_IPV6_ADD + block + '$' ) ) != -1
&& address.search( /::/ ) != -1 && address.search( /::.*::/ ) == -1;
+ },
+
+ /**
+ * Apply WAI-ARIA accessibility roles for guiding accessibility tools and devices.
+ */
+ 'applyWaiAria' : function() {
+ $( '#p-logo' ).attr( 'role', 'banner' );
+ $( '#content' ).attr( 'role', 'main' );
+ $( '#footer' ).attr( 'role', 'contentinfo' );
+ $( '#p-navigation' ).attr( 'role', 'navigation' );
+ $( '#toc' ).attr( 'role', 'navigation' );
+ $( '#p-search' ).attr( 'role', 'search' );
}
-
};
mw.util.init();

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5195
Default Alt Text
18338 (1 KB)

Event Timeline