freeCodeCamp/curriculum/challenges/portuguese/01-responsive-web-design/applied-accessibility/make-screen-reader-navigati...

3.3 KiB

id title challengeType videoUrl forumTopicId dashedName
587d7787367417b2b2512aa1 Facilitar a navegação do leitor de tela com o ponto de referência header 0 https://scrimba.com/c/cB76vtv 301023 make-screen-reader-navigation-easier-with-the-header-landmark

--description--

O próximo elemento HTML5 que adiciona significado semântico e melhora a acessibilidade é a tag header. Ela é usada para envolver informações introdutórias ou links de navegação e funciona bem em torno do conteúdo que é repetido no topo em várias páginas.

O elemento header compartilha o recurso de referência incorporado que você viu em main, permitindo que tecnologias de assistência naveguem rapidamente até esse conteúdo.

**Observação: ** o elemento header deve ser usado na tag body do seu documento HTML. É diferente do elemento head, que contém o título da página, metadados, etc.

--instructions--

O Camper Cat está escrevendo ótimos artigos sobre treinamento de ninjas e deseja adicionar uma página para eles no site. Altere a div superior que atualmente contém o h1 para uma tag header.

--hints--

O código deve ter uma tag header.

assert($('header').length == 1);

A tag header deve envolver o h1.

assert($('header').children('h1').length == 1);

O código não deve ter nenhuma tag div.

assert($('div').length == 0);

O elemento header deve ter uma tag de fechamento.

assert(
  code.match(/<\/header>/g) &&
    code.match(/<\/header>/g).length === code.match(/<header>/g).length
);

--seed--

--seed-contents--

<body>

  <div>
    <h1>Training with Camper Cat</h1>
  </div>


  <main>
    <section id="stealth">
      <h2>Stealth &amp; Agility Training</h2>
      <article><h3>Climb foliage quickly using a minimum spanning tree approach</h3></article>
      <article><h3>No training is NP-complete without parkour</h3></article>
    </section>
    <section id="combat">
      <h2>Combat Training</h2>
      <article><h3>Dispatch multiple enemies with multithreaded tactics</h3></article>
      <article><h3>Goodbye world: 5 proven ways to knock out an opponent</h3></article>
    </section>
    <section id="weapons">
      <h2>Weapons Training</h2>
      <article><h3>Swords: the best tool to literally divide and conquer</h3></article>
      <article><h3>Breadth-first or depth-first in multi-weapon training?</h3></article>
    </section>
  </main>
</body>

--solutions--

<body>

  <header>
    <h1>Training with Camper Cat</h1>
  </header>


  <main>
    <section id="stealth">
      <h2>Stealth &amp; Agility Training</h2>
      <article><h3>Climb foliage quickly using a minimum spanning tree approach</h3></article>
      <article><h3>No training is NP-complete without parkour</h3></article>
    </section>
    <section id="combat">
      <h2>Combat Training</h2>
      <article><h3>Dispatch multiple enemies with multithreaded tactics</h3></article>
      <article><h3>Goodbye world: 5 proven ways to knock out an opponent</h3></article>
    </section>
    <section id="weapons">
      <h2>Weapons Training</h2>
      <article><h3>Swords: the best tool to literally divide and conquer</h3></article>
      <article><h3>Breadth-first or depth-first in multi-weapon training?</h3></article>
    </section>
  </main>
</body>