Fossil SCM
Use <h3> tags, with a CSS class for styling, for the title on forum posts, as this works better for screen readers.
Commit
fb85d7b632e66065e4519bb2a1e439919ab09c7fc6c141e8d7ac972c7da52bbd
Parent
a584491ab87691c…
1 file changed
+13
-10
+13
-10
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -362,11 +362,11 @@ | ||
| 362 | 362 | } |
| 363 | 363 | if( pPost->zThreadTitle ){ |
| 364 | 364 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 365 | 365 | } |
| 366 | 366 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 367 | - @ <p>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate) | |
| 367 | + @ <h3 class='forumPostHdr'>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate) | |
| 368 | 368 | fossil_free(zDate); |
| 369 | 369 | if( p->pEdit ){ |
| 370 | 370 | @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\ |
| 371 | 371 | @ %d(p->pEdit->sid)</a> |
| 372 | 372 | } |
| @@ -392,10 +392,11 @@ | ||
| 392 | 392 | if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){ |
| 393 | 393 | @ %z(href("%R/forumpost/%S?raw",p->zUuid))[source]</a> |
| 394 | 394 | } |
| 395 | 395 | isPrivate = content_is_private(p->fpid); |
| 396 | 396 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 397 | + @ </h3> | |
| 397 | 398 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 398 | 399 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 399 | 400 | }else{ |
| 400 | 401 | forum_render(0, pPost->zMimetype, pPost->zWiki, 0); |
| 401 | 402 | } |
| @@ -480,11 +481,12 @@ | ||
| 480 | 481 | if( pPost==0 ) continue; |
| 481 | 482 | if( pPost->zThreadTitle ){ |
| 482 | 483 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 483 | 484 | } |
| 484 | 485 | zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate); |
| 485 | - @ <p>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate) | |
| 486 | + @ <h3 class='forumPostHdr'>\ | |
| 487 | + @ (%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate) | |
| 486 | 488 | fossil_free(zDate); |
| 487 | 489 | if( g.perm.Debug ){ |
| 488 | 490 | @ <span class="debug">\ |
| 489 | 491 | @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span> |
| 490 | 492 | } |
| @@ -514,10 +516,11 @@ | ||
| 514 | 516 | if( pIrt ){ |
| 515 | 517 | @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\ |
| 516 | 518 | @ %d(pIrt->sid)</a> |
| 517 | 519 | } |
| 518 | 520 | } |
| 521 | + @ </h3> | |
| 519 | 522 | isPrivate = content_is_private(fpid); |
| 520 | 523 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 521 | 524 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 522 | 525 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 523 | 526 | }else{ |
| @@ -1014,18 +1017,18 @@ | ||
| 1014 | 1017 | if( zMimetype==0 ) zMimetype = fossil_strdup(pPost->zMimetype); |
| 1015 | 1018 | if( zTitle==0 && pPost->zThreadTitle!=0 ){ |
| 1016 | 1019 | zTitle = fossil_strdup(pPost->zThreadTitle); |
| 1017 | 1020 | } |
| 1018 | 1021 | style_header("Edit %s", zTitle ? "Post" : "Reply"); |
| 1019 | - @ <h1>Original Post:</h1> | |
| 1022 | + @ <h2>Original Post:</h2> | |
| 1020 | 1023 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1021 | 1024 | "forumEdit"); |
| 1022 | 1025 | if( P("preview") ){ |
| 1023 | - @ <h1>Preview of Edited Post:</h1> | |
| 1026 | + @ <h2>Preview of Edited Post:</h2> | |
| 1024 | 1027 | forum_render(zTitle, zMimetype, zContent,"forumEdit"); |
| 1025 | 1028 | } |
| 1026 | - @ <h1>Revised Message:</h1> | |
| 1029 | + @ <h2>Revised Message:</h2> | |
| 1027 | 1030 | @ <form action="%R/forume2" method="POST"> |
| 1028 | 1031 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1029 | 1032 | @ <input type="hidden" name="edit" value="1"> |
| 1030 | 1033 | forum_from_line(); |
| 1031 | 1034 | forum_entry_widget(zTitle, zMimetype, zContent); |
| @@ -1032,23 +1035,23 @@ | ||
| 1032 | 1035 | }else{ |
| 1033 | 1036 | /* Reply */ |
| 1034 | 1037 | zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE); |
| 1035 | 1038 | zContent = PDT("content",""); |
| 1036 | 1039 | style_header("Reply"); |
| 1037 | - @ <h1>Replying To:</h1> | |
| 1038 | 1040 | if( pRootPost->zThreadTitle ){ |
| 1039 | - @ <h3>%h(pRootPost->zThreadTitle)</h3> | |
| 1041 | + @ <h1>Thread: %h(pRootPost->zThreadTitle)</h1> | |
| 1040 | 1042 | } |
| 1043 | + @ <h2>Replying To:</h2> | |
| 1041 | 1044 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 1042 | - @ <p>%h(pPost->zThreadTitle ? "Post" : "Reply") by %h(pPost->zUser) on %h(zDate) | |
| 1045 | + @ <h3 class='forumPostHdr'>By %h(pPost->zUser) on %h(zDate)</h3> | |
| 1043 | 1046 | fossil_free(zDate); |
| 1044 | 1047 | forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit"); |
| 1045 | 1048 | if( P("preview") ){ |
| 1046 | - @ <h1>Preview:</h1> | |
| 1049 | + @ <h2>Preview:</h2> | |
| 1047 | 1050 | forum_render(0, zMimetype,zContent, "forumEdit"); |
| 1048 | 1051 | } |
| 1049 | - @ <h1>Enter Reply:</h1> | |
| 1052 | + @ <h2>Enter Reply:</h2> | |
| 1050 | 1053 | @ <form action="%R/forume2" method="POST"> |
| 1051 | 1054 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1052 | 1055 | @ <input type="hidden" name="reply" value="1"> |
| 1053 | 1056 | forum_from_line(); |
| 1054 | 1057 | forum_entry_widget(0, zMimetype, zContent); |
| 1055 | 1058 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -362,11 +362,11 @@ | |
| 362 | } |
| 363 | if( pPost->zThreadTitle ){ |
| 364 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 365 | } |
| 366 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 367 | @ <p>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate) |
| 368 | fossil_free(zDate); |
| 369 | if( p->pEdit ){ |
| 370 | @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\ |
| 371 | @ %d(p->pEdit->sid)</a> |
| 372 | } |
| @@ -392,10 +392,11 @@ | |
| 392 | if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){ |
| 393 | @ %z(href("%R/forumpost/%S?raw",p->zUuid))[source]</a> |
| 394 | } |
| 395 | isPrivate = content_is_private(p->fpid); |
| 396 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 397 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 398 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 399 | }else{ |
| 400 | forum_render(0, pPost->zMimetype, pPost->zWiki, 0); |
| 401 | } |
| @@ -480,11 +481,12 @@ | |
| 480 | if( pPost==0 ) continue; |
| 481 | if( pPost->zThreadTitle ){ |
| 482 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 483 | } |
| 484 | zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate); |
| 485 | @ <p>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate) |
| 486 | fossil_free(zDate); |
| 487 | if( g.perm.Debug ){ |
| 488 | @ <span class="debug">\ |
| 489 | @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span> |
| 490 | } |
| @@ -514,10 +516,11 @@ | |
| 514 | if( pIrt ){ |
| 515 | @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\ |
| 516 | @ %d(pIrt->sid)</a> |
| 517 | } |
| 518 | } |
| 519 | isPrivate = content_is_private(fpid); |
| 520 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 521 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 522 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 523 | }else{ |
| @@ -1014,18 +1017,18 @@ | |
| 1014 | if( zMimetype==0 ) zMimetype = fossil_strdup(pPost->zMimetype); |
| 1015 | if( zTitle==0 && pPost->zThreadTitle!=0 ){ |
| 1016 | zTitle = fossil_strdup(pPost->zThreadTitle); |
| 1017 | } |
| 1018 | style_header("Edit %s", zTitle ? "Post" : "Reply"); |
| 1019 | @ <h1>Original Post:</h1> |
| 1020 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1021 | "forumEdit"); |
| 1022 | if( P("preview") ){ |
| 1023 | @ <h1>Preview of Edited Post:</h1> |
| 1024 | forum_render(zTitle, zMimetype, zContent,"forumEdit"); |
| 1025 | } |
| 1026 | @ <h1>Revised Message:</h1> |
| 1027 | @ <form action="%R/forume2" method="POST"> |
| 1028 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1029 | @ <input type="hidden" name="edit" value="1"> |
| 1030 | forum_from_line(); |
| 1031 | forum_entry_widget(zTitle, zMimetype, zContent); |
| @@ -1032,23 +1035,23 @@ | |
| 1032 | }else{ |
| 1033 | /* Reply */ |
| 1034 | zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE); |
| 1035 | zContent = PDT("content",""); |
| 1036 | style_header("Reply"); |
| 1037 | @ <h1>Replying To:</h1> |
| 1038 | if( pRootPost->zThreadTitle ){ |
| 1039 | @ <h3>%h(pRootPost->zThreadTitle)</h3> |
| 1040 | } |
| 1041 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 1042 | @ <p>%h(pPost->zThreadTitle ? "Post" : "Reply") by %h(pPost->zUser) on %h(zDate) |
| 1043 | fossil_free(zDate); |
| 1044 | forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit"); |
| 1045 | if( P("preview") ){ |
| 1046 | @ <h1>Preview:</h1> |
| 1047 | forum_render(0, zMimetype,zContent, "forumEdit"); |
| 1048 | } |
| 1049 | @ <h1>Enter Reply:</h1> |
| 1050 | @ <form action="%R/forume2" method="POST"> |
| 1051 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1052 | @ <input type="hidden" name="reply" value="1"> |
| 1053 | forum_from_line(); |
| 1054 | forum_entry_widget(0, zMimetype, zContent); |
| 1055 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -362,11 +362,11 @@ | |
| 362 | } |
| 363 | if( pPost->zThreadTitle ){ |
| 364 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 365 | } |
| 366 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 367 | @ <h3 class='forumPostHdr'>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate) |
| 368 | fossil_free(zDate); |
| 369 | if( p->pEdit ){ |
| 370 | @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\ |
| 371 | @ %d(p->pEdit->sid)</a> |
| 372 | } |
| @@ -392,10 +392,11 @@ | |
| 392 | if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){ |
| 393 | @ %z(href("%R/forumpost/%S?raw",p->zUuid))[source]</a> |
| 394 | } |
| 395 | isPrivate = content_is_private(p->fpid); |
| 396 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 397 | @ </h3> |
| 398 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 399 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 400 | }else{ |
| 401 | forum_render(0, pPost->zMimetype, pPost->zWiki, 0); |
| 402 | } |
| @@ -480,11 +481,12 @@ | |
| 481 | if( pPost==0 ) continue; |
| 482 | if( pPost->zThreadTitle ){ |
| 483 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 484 | } |
| 485 | zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate); |
| 486 | @ <h3 class='forumPostHdr'>\ |
| 487 | @ (%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate) |
| 488 | fossil_free(zDate); |
| 489 | if( g.perm.Debug ){ |
| 490 | @ <span class="debug">\ |
| 491 | @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span> |
| 492 | } |
| @@ -514,10 +516,11 @@ | |
| 516 | if( pIrt ){ |
| 517 | @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\ |
| 518 | @ %d(pIrt->sid)</a> |
| 519 | } |
| 520 | } |
| 521 | @ </h3> |
| 522 | isPrivate = content_is_private(fpid); |
| 523 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 524 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 525 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 526 | }else{ |
| @@ -1014,18 +1017,18 @@ | |
| 1017 | if( zMimetype==0 ) zMimetype = fossil_strdup(pPost->zMimetype); |
| 1018 | if( zTitle==0 && pPost->zThreadTitle!=0 ){ |
| 1019 | zTitle = fossil_strdup(pPost->zThreadTitle); |
| 1020 | } |
| 1021 | style_header("Edit %s", zTitle ? "Post" : "Reply"); |
| 1022 | @ <h2>Original Post:</h2> |
| 1023 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1024 | "forumEdit"); |
| 1025 | if( P("preview") ){ |
| 1026 | @ <h2>Preview of Edited Post:</h2> |
| 1027 | forum_render(zTitle, zMimetype, zContent,"forumEdit"); |
| 1028 | } |
| 1029 | @ <h2>Revised Message:</h2> |
| 1030 | @ <form action="%R/forume2" method="POST"> |
| 1031 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1032 | @ <input type="hidden" name="edit" value="1"> |
| 1033 | forum_from_line(); |
| 1034 | forum_entry_widget(zTitle, zMimetype, zContent); |
| @@ -1032,23 +1035,23 @@ | |
| 1035 | }else{ |
| 1036 | /* Reply */ |
| 1037 | zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE); |
| 1038 | zContent = PDT("content",""); |
| 1039 | style_header("Reply"); |
| 1040 | if( pRootPost->zThreadTitle ){ |
| 1041 | @ <h1>Thread: %h(pRootPost->zThreadTitle)</h1> |
| 1042 | } |
| 1043 | @ <h2>Replying To:</h2> |
| 1044 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 1045 | @ <h3 class='forumPostHdr'>By %h(pPost->zUser) on %h(zDate)</h3> |
| 1046 | fossil_free(zDate); |
| 1047 | forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit"); |
| 1048 | if( P("preview") ){ |
| 1049 | @ <h2>Preview:</h2> |
| 1050 | forum_render(0, zMimetype,zContent, "forumEdit"); |
| 1051 | } |
| 1052 | @ <h2>Enter Reply:</h2> |
| 1053 | @ <form action="%R/forume2" method="POST"> |
| 1054 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1055 | @ <input type="hidden" name="reply" value="1"> |
| 1056 | forum_from_line(); |
| 1057 | forum_entry_widget(0, zMimetype, zContent); |
| 1058 |