File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,17 @@ function initial() {
1717 if ( elem = document . querySelector ( "#col_messages" ) )
1818 elem . setAttribute ( "aria-owns" , "messages_container footer" ) ;
1919 // Same for the unread messages status, which appears below in DOM order but earlier visually.
20- if ( elem = document . querySelector ( "#messages_container" ) )
21- elem . setAttribute ( "aria-owns" , "messages_unread_status threads_view_banner monkey_scroll_wrapper_for_msgs_scroller_div monkey_scroll_wrapper_for_threads_msgs_scroller_div" ) ;
20+ if ( elem = document . querySelector ( "#messages_container" ) ) {
21+ // We must specify all children so we can guarantee the order.
22+ // The children have different ids in Firefox and Chrome.
23+ var owns = "messages_unread_status" ;
24+ for ( var child of elem . children ) {
25+ if ( child . id && child . id != "messages_unread_status" ) {
26+ owns += " " + child . id ;
27+ }
28+ }
29+ elem . setAttribute ( "aria-owns" , owns ) ;
30+ }
2231}
2332
2433// Make the starred status accessible.
You can’t perform that action at this time.
0 commit comments