2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>
|
|
|
|
HTML offers various element to organize content on a web page that screen readers are aware of. Preferring Semantic HTML for good semantics provide out of the box support for reader which is not possible when regular <i>div</i>
|
|
|
|
elements with classes are used. Consider the following example that do not mean too much for readers.
|
|
|
|
</p>
|
|
|
|
</DocSectionText>
|
|
|
|
|
2023-03-29 10:45:02 +00:00
|
|
|
<pre v-code><code>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="header">
|
|
|
|
<div class="header-text">Header</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="nav"></div>
|
|
|
|
|
|
|
|
<div class="main">
|
|
|
|
<div class="content">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="sidebar">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="footer">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</code></pre>
|
|
|
|
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="doc-section-description mt-4">
|
2023-03-21 08:31:13 +00:00
|
|
|
<p>Same layout can be achieved using the semantic elements with screen reader support built-in.</p>
|
|
|
|
</div>
|
2023-03-29 10:45:02 +00:00
|
|
|
<pre v-code><code>
|
2023-02-28 08:29:30 +00:00
|
|
|
<header>
|
|
|
|
<h1>Header</h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<nav></nav>
|
|
|
|
|
|
|
|
<main>
|
|
|
|
<article></article>
|
|
|
|
|
|
|
|
<aside></aside>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
</code></pre>
|
|
|
|
</template>
|