fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2012-05-13 09:15 am

[dw-free] need headings for accessibility in site scheme

[commit: http://hg.dwscoalition.org/dw-free/rev/11b560fda973]

http://bugs.dwscoalition.org/show_bug.cgi?id=3995

Use h2 for entry headings, and h3 for comment headings in the site skin.
Some CSS tweaks so appearance is not affected.

Patch by [personal profile] deborah.

Files modified:
  • htdocs/stc/talkpage.css
  • htdocs/talkread.bml
--------------------------------------------------------------------------------
diff -r 20f7a57389ac -r 11b560fda973 htdocs/stc/talkpage.css
--- a/htdocs/stc/talkpage.css	Sun May 13 16:44:30 2012 +0800
+++ b/htdocs/stc/talkpage.css	Sun May 13 17:15:56 2012 +0800
@@ -6,6 +6,17 @@
     margin-bottom: 10px;
 }
 
+/* adding headers for semantic page layout/accessibility, but
+ * don't want to change sitescheme look and feel
+ */
+#entrysubj h2 {
+    font-weight: bold;
+    font-style: italic;
+    font-size: larger;
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+
 #poster {
     margin-top: 10px;
 }
@@ -46,6 +57,13 @@
     font-weight: bold;
 }
 
+/* adding headers for semantic page layout/accessibility, but
+ * don't want to change sitescheme look and feel
+ */
+h3.commentsubject {
+    display: inline;
+}
+
 .datepost {
     font-size: smaller;
 }
diff -r 20f7a57389ac -r 11b560fda973 htdocs/talkread.bml
--- a/htdocs/talkread.bml	Sun May 13 16:44:30 2012 +0800
+++ b/htdocs/talkread.bml	Sun May 13 17:15:56 2012 +0800
@@ -338,7 +338,7 @@
         $subject = $T{nosubject};
     }
     my $flags = ( $sec or $age_restriction ) ? "$sec$age_restriction " : "";
-    $ret .= qq{<div id='entrysubj'>$flags<a href="$talkurl">$subject</a></div><br />\n};
+    $ret .= qq{<div id='entrysubj'>$flags<h2><a href="$talkurl">$subject</a></h2></div>\n};
 
     $event = LJ::CleanHTML::quote_html( $event, $GET{nohtml} );
     $ret .= $event;
@@ -538,15 +538,20 @@
                 }
 
                 my $cleansubject = LJ::ehtml( $post->{'subject'} );
+                if ( $cleansubject eq "" ) {
+                    $cleansubject = "<span class='invisible'>no subject</span>";
+                }
+
 
                 my $echitext = "";
                 if ( $post->{echi} ) {
                     $echitext = qq{<span class="echi">$post->{echi}.</span> };
                 }
                 if ( $post->{state} eq 'S' ) {
-                    $ret .= "<span class='commentsubject'>" . BML::ml( '.comment.screened.subject' ) . "$echitext<b>$cleansubject</b></span> $icon";
+                    $ret .= "<h3 class='commentsubject'>" .  BML::ml( '.comment.screened.subject' ) .  "$echitext$cleansubject</h3> $icon";
                 } else {
-                    $ret .= "<span class='commentsubject'><b>$echitext$cleansubject</b></span> $icon";
+                    $ret .= "<h3 class='commentsubject'>$echitext$cleansubject</h3> $icon";
+
                 }
                 $ret .= "<br />$user\n";
                 $ret .= " " . BML::ml( '.from_external', {site=>$post->{props}->{imported_from}} ) if $post->{props}->{imported_from};
--------------------------------------------------------------------------------