Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5645
18338
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
•
bzimport
Nov 21 2014, 10:35 PM
2014-11-21 22:35:39 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
18338
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5195
Default Alt Text
18338 (1 KB)
Attached To
Mode
T20338: Use WAI-ARIA landmark roles to improve accessibility
Attached
Detach File
Event Timeline
Log In to Comment