Skip to content

Commit f446e6f

Browse files
committed
fix(a11y): Add semantic structure to installer page layout
aria landmark roles allow advanced screen reader users to jump around the page quickly. Aria roles are used in addition to semantic elements because browsers do not yet consistently expose the semantic elements as landmarks to assistive technology. Ideally we would actually just shim this behavior with JS so that we don't have to worry about consistently pairing the elements with their equivalent roles.
1 parent 434efa2 commit f446e6f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

views/installation/page/default.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,24 @@
3434
</head>
3535
<body>
3636
<div class="elgg-page">
37-
<div class="elgg-page-header">
37+
<header class="elgg-page-header" role="banner">
3838
<?php echo elgg_view('page/elements/header', $vars); ?>
39-
</div>
39+
</header>
4040
<div class="elgg-page-body">
4141
<div class="elgg-layout">
42-
<div class="elgg-sidebar">
42+
<aside class="elgg-sidebar" role="complementary">
4343
<?php echo elgg_view('page/elements/sidebar', $vars); ?>
44-
</div>
45-
<div class="elgg-body">
46-
<h2><?php echo $vars['title']; ?></h2>
44+
</aside>
45+
<main class="elgg-body" role="main">
46+
<h1><?php echo $vars['title']; ?></h1>
4747
<?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
4848
<?php echo $vars['body']; ?>
49-
</div>
49+
</main>
5050
</div>
5151
</div>
52-
<div class="elgg-page-footer">
52+
<footer class="elgg-page-footer" role="contentinfo">
5353
<?php echo elgg_view('page/elements/footer'); ?>
54-
</div>
54+
</footer>
5555
</div>
5656
</body>
5757
</html>

0 commit comments

Comments
 (0)