Skip to content

Commit f0b7aa0

Browse files
committed
ARIA nonsense
1 parent 407132e commit f0b7aa0

File tree

12 files changed

+28
-26
lines changed

12 files changed

+28
-26
lines changed

devel/manual/css.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Generic values
6565
* `#h-messages`
6666
* `#h-usermenu`
6767
* `#h-usermenubutton`
68+
* `#h-title`
6869
* `id^=n-` is for navigation elements (quicklinks)
6970
* `#n-next`
7071
* `#n-prev`

lib/qrequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,9 @@ function print_header($title, $id, $extra = []) {
685685
}
686686

687687
function print_footer() {
688-
echo '<hr class="c"></div>', // close #p-body
688+
echo '<hr class="c"></main>', // close #p-body
689689
'</div>', // close #p-page
690-
'<div id="p-footer" class="need-banner-offset banner-bottom">',
690+
'<footer id="p-footer" class="need-banner-offset banner-bottom">',
691691
$this->_conf->opt("extraFooter") ?? "",
692692
'<a class="noq" href="https://hotcrp.com/">HotCRP</a>';
693693
if (!$this->_conf->opt("noFooterVersion")) {
@@ -702,7 +702,7 @@ function print_footer() {
702702
echo "<!-- Version ", HOTCRP_VERSION, " -->";
703703
}
704704
}
705-
echo '</div>', Ht::unstash(), "</body>\n</html>\n";
705+
echo '</footer>', Ht::unstash(), "</body>\n</html>\n";
706706
}
707707

708708
static function print_footer_hook(Contact $user, Qrequest $qreq) {

src/conference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5193,7 +5193,7 @@ private function print_body_header($qreq, $title, $id, $extra) {
51935193
$title .= " <span class=\"pl-2 pr-2\">&#x2215;</span> <strong>{$subtitle}</strong>";
51945194
}
51955195
if ($title && $title !== "Home") {
5196-
$title_div = "<div id=\"h-page\"><h1>{$title}</h1></div>";
5196+
$title_div = "<div id=\"h-page\"><h1 id=\"h-title\">{$title}</h1></div>";
51975197
}
51985198
}
51995199
echo $title_div ?? "";
@@ -5254,7 +5254,7 @@ function print_body_entry($qreq, $title, $id, $extra = []) {
52545254
}
52555255
echo "</div></header>\n";
52565256

5257-
echo "<div id=\"p-body\">\n";
5257+
echo "<main id=\"p-body\">\n";
52585258

52595259
// If browser owns tracker, send it the script immediately
52605260
if ($this->has_active_tracker()

src/pages/p_authorize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private function handle_request(OAuthClient $client) {
168168
}
169169

170170
function print_form_title() {
171-
echo '<h1>Choose an account</h1>';
171+
echo '<h1 id="h-title">Choose an account</h1>';
172172
$clt = htmlspecialchars($this->client->title ?? $this->client->name);
173173
if ($this->client->client_uri) {
174174
$clt = Ht::link($clt, htmlspecialchars($this->client->client_uri));

src/pages/p_help.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ static function go(Contact $user, Qrequest $qreq) {
6868
$klass = $gj->name === "list" ? " leftmenu-item-gap3" : "";
6969
}
7070
echo "</ul></nav></div>\n",
71-
'<main id="helpcontent" class="leftmenu-content main-column">',
71+
'<div class="leftmenu-content main-column">',
7272
'<h2 class="leftmenu">', $topicj->title, '</h2>';
7373
$conf->report_saved_messages();
7474
$help_topics->print_body_members($topic);
75-
echo "</main>\n";
75+
echo "</div>\n";
7676

7777
$qreq->print_footer();
7878
}

src/pages/p_home.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function print_head(Contact $user, Qrequest $qreq, ComponentSet $gx) {
9595
}
9696

9797
function print_content(Contact $user, Qrequest $qreq, ComponentSet $gx) {
98-
echo '<main class="home-content">';
98+
echo '<div class="home-content">';
9999
ob_start();
100100
$gx->print_members("home/sidebar");
101101
if (($t = ob_get_clean()) !== "") {
@@ -104,7 +104,7 @@ function print_content(Contact $user, Qrequest $qreq, ComponentSet $gx) {
104104
}
105105
echo '<div class="home-main">';
106106
$gx->print_members("home/main");
107-
echo "</div></main>\n";
107+
echo "</div></div>\n";
108108
}
109109

110110
private function print_h2_home($x) {

src/pages/p_profile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ function print() {
661661
}
662662

663663
echo '</nav></div>',
664-
'<main id="profilecontent" class="leftmenu-content main-column">';
664+
'<div class="leftmenu-content main-column">';
665665

666666
if ($this->page_type === 2) {
667667
echo '<h2 class="leftmenu">Bulk update</h2>';
@@ -713,7 +713,7 @@ function print() {
713713
echo "</div>"; // foldaccount
714714
}
715715

716-
echo "</main></form>",
716+
echo "</div></form>",
717717
// include #f-reauth in case we need to reauthenticate
718718
'<form id="f-reauth" class="ui-submit js-reauth"></form>';
719719

src/pages/p_search.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ private function print_list($pl_text, $qreq, $limits) {
241241
Ht::msg($search->full_feedback_html(), min($search->problem_status(), MessageSet::WARNING)),
242242
'</div>';
243243
}
244-
245-
echo "<div class=\"maintabsep\"></div>\n\n";
244+
echo "\n";
246245

247246
if ($this->pl->has("sel")) {
248247
echo Ht::form($this->conf->selfurl($qreq, ["forceShow" => null], Conf::HOTURL_POST), ["id" => "sel", "class" => "ui-submit js-submit-list"]),

src/pages/p_settings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ function print($group, $qreq) {
123123
echo '</ul><div class="leftmenu-if-left if-differs mt-5">',
124124
Ht::submit("update", "Save changes", ["class" => "btn-primary"]),
125125
"</div></nav></div>\n",
126-
'<main class="leftmenu-content main-column">';
126+
'<div class="leftmenu-content main-column">';
127127

128128
if ($group !== "list") {
129129
$this->print_extant_group($group, $groupj, $qreq);
130130
} else {
131131
$this->print_list();
132132
}
133133

134-
echo "</main></form>\n";
134+
echo "</div></form>\n";
135135
Ht::stash_script('$("#f-settings").awaken()');
136136
$qreq->print_footer();
137137
}

src/pages/p_signin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static function print_signin_form(Contact $user, Qrequest $qreq, $cs) {
172172
}
173173

174174
static function print_signin_form_title(Contact $user, Qrequest $qreq) {
175-
echo '<h1 class="signin">Sign in</h1>';
175+
echo '<h1 id="h-title" class="signin">Sign in</h1>';
176176
}
177177

178178
static function print_signin_form_accounts(Contact $user, Qrequest $qreq) {
@@ -301,7 +301,7 @@ static function print_signout(Contact $user, Qrequest $qreq, $cs) {
301301
} else {
302302
$qreq->print_header("Sign out", "signout", ["action_bar" => "", "hide_title" => true, "body_class" => "body-signin"]);
303303
self::print_form_start_for($qreq, "signout");
304-
echo '<h1 class="signin">Sign out</h1><div class="mb-5">',
304+
echo '<h1 id="h-title" class="signin">Sign out</h1><div class="mb-5">',
305305
$user->conf->_("Use this page to sign out of the site."),
306306
'</div><div class="popup-actions">',
307307
Ht::submit("Sign out", ["class" => "btn-danger", "value" => 1]),
@@ -404,7 +404,7 @@ static function print_newaccount_body(Contact $user, Qrequest $qreq, $cs) {
404404
Ht::stash_script("hotcrp.focus_within(\$(\"#f-signin\"));window.scroll(0,0)");
405405
}
406406
static function print_newaccount_form_title() {
407-
echo '<h1 class="signin">Create account</h1>';
407+
echo '<h1 id="h-title" class="signin">Create account</h1>';
408408
}
409409
static function print_newaccount_form_description(Contact $user) {
410410
$m = $user->conf->_("Enter your email and we’ll create an account and send you instructions for signing in.");
@@ -459,7 +459,7 @@ static function print_forgot_body(Contact $user, Qrequest $qreq, $cs) {
459459
Ht::stash_script("hotcrp.focus_within(\$(\"#f-signin\"));window.scroll(0,0)");
460460
}
461461
static function print_forgot_form_title() {
462-
echo '<h1 class="signin">Forgot password</h1>';
462+
echo '<h1 id="h-title" class="signin">Forgot password</h1>';
463463
}
464464
static function print_forgot_form_description(Contact $user, Qrequest $qreq, $cs) {
465465
echo '<p class="mb-5">Enter your email and we’ll send you a link to reset your password.';
@@ -623,7 +623,7 @@ function print_reset_body(Contact $user, Qrequest $qreq, $cs) {
623623
Ht::stash_script("hotcrp.focus_within(\$(\"#f-signin\"));window.scroll(0,0)");
624624
}
625625
static function print_reset_form_title() {
626-
echo '<h1 class="signin">Reset password</h1>';
626+
echo '<h1 id="h-title" class="signin">Reset password</h1>';
627627
}
628628
static function print_reset_form_description() {
629629
echo '<p class="mb-5">Use this form to set a new password. You may want to use the random password we’ve chosen.</p>';

0 commit comments

Comments
 (0)