Make date headings a proper semantic <h2> heading

To support accessibility, make sure the titles in Special:Notifications
are <h2> headings.

Bug: T149955
Change-Id: I4f15694efb04896e9bd7b026d297891047759644
This commit is contained in:
Moriel Schottlender 2017-04-12 16:51:07 -07:00 committed by Catrope
parent 6e593a9301
commit ebbe2e81af
2 changed files with 10 additions and 3 deletions

View file

@ -1,7 +1,14 @@
@import '../echo.variables'; @import '../echo.variables';
.mw-echo-ui-datedSubGroupListWidget { .mw-echo-ui-datedSubGroupListWidget {
&-title { .mw-body-content &-title {
font-weight: normal; // Since the title is <h2> we want to specifically
// change the styling to bring it back to mimic a
// content span. We also must override the h2 rules
// so specificity is important
font-weight: inherit;
font-size: inherit;
font-family: inherit;
border: 0;
&-primary { &-primary {
font-size: 1.5em; font-size: 1.5em;

View file

@ -18,7 +18,7 @@
.addClass( 'mw-echo-ui-datedSubGroupListWidget-title-primary' ), .addClass( 'mw-echo-ui-datedSubGroupListWidget-title-primary' ),
$secondaryDate = $( '<span>' ) $secondaryDate = $( '<span>' )
.addClass( 'mw-echo-ui-datedSubGroupListWidget-title-secondary' ), .addClass( 'mw-echo-ui-datedSubGroupListWidget-title-secondary' ),
$title = $( '<span>' ) $title = $( '<h2>' )
.addClass( 'mw-echo-ui-datedSubGroupListWidget-title' ) .addClass( 'mw-echo-ui-datedSubGroupListWidget-title' )
.append( $primaryDate, $secondaryDate ); .append( $primaryDate, $secondaryDate );